You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* More uv managed revisions
- The instructions for installation from PyPI have only two options, Cookieplone and Buildout, not the three options from the include. The attempt to avoid DRY with an include won't work here.
* - DRY for complete the add-on installation
* "mxdev" isn't an inline literal
* "mxdev" isn't an inline literal
* tighten up spacing
* grammar
* Increasing specificity
* Make URL clickable
* Add an introductory paragraph to the empty subheading
* - Link to sections in add-ons documentation
- spelling of mxdev and pip
- Oxford comma
* Fix Vale errors
* Fix Vale errors
* Remove unnecessary section subheading
* Promote uv as the first package manager, and combine its first two sentences.
* MyST markup, grammar, link to the pip interface for uv
* Update docs/conceptual-guides/package-management.md
* Update docs/admin-guide/override-core.md
Co-authored-by: David Glick <david@glicksoftware.com>
---------
Co-authored-by: David Glick <david@glicksoftware.com>
In your web browser, and assuming you are currently logged in as an administrator, visit the URL http://localhost:8080/Plone/prefs_install_products_form.
2
+
3
+
Then click the {guilabel}`Install` button next to your add-on to complete installation of the add-on.
4
+
5
+
Some add-ons have configuration options.
6
+
To configure such add-ons, return to the {guilabel}`Site Setup` control panel.
7
+
At the bottom of the page, you should see the heading {guilabel}`Add-on Configuration`, and a control panel to configure the add-on that you just installed.
Copy file name to clipboardExpand all lines: docs/admin-guide/add-ons.md
+31-14Lines changed: 31 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,17 +98,39 @@ You can control which version of an add-on to install through "version pinning."
98
98
99
99
### Install the add-on
100
100
101
-
```{include} /_inc/_build-and-restart.md
101
+
If the backend is running, stop it with {kbd}`ctrl-c`.
102
+
103
+
To actually download and install the new add-on, run the following command.
104
+
105
+
`````{tab-set}
106
+
````{tab-item} Cookieplone
107
+
:sync: cookieplone
108
+
109
+
```shell
110
+
make backend-build
111
+
```
112
+
````
113
+
114
+
````{tab-item} Buildout
115
+
:sync: buildout
116
+
117
+
```shell
118
+
bin/buildout -N
102
119
```
120
+
````
121
+
`````
122
+
123
+
Next, restart the backend.
103
124
104
-
In your web browser, and assuming you are currently logged in as an administrator, visit the URL http://localhost:8080/Plone/prefs_install_products_form.
125
+
```{seealso}
126
+
{doc}`run-plone`
127
+
```
105
128
106
-
Then click the {guilabel}`Install` button next to your add-on to complete installation of the add-on.
129
+
```{include} /_inc/_add-on-complete-install.md
130
+
```
107
131
108
-
Some add-ons have configuration options.
109
-
To configure such add-ons, return to the {guilabel}`Site Setup` control panel.
110
-
At the bottom of the page, you should see the heading {guilabel}`Add-on Configuration`, and a control panel to configure the add-on that you just installed.
111
132
133
+
(install-an-add-on-from-source-label)=
112
134
113
135
## Install an add-on from source
114
136
@@ -190,7 +212,7 @@ extras=test
190
212
191
213
```{seealso}
192
214
The {file}`mx.ini` file configures a tool called {term}`mxdev`.
193
-
For an explanation of why Plone uses `mxdev`, see {ref}`manage-packages-mxdev-label`.
215
+
For an explanation of why Plone uses mxdev, see {ref}`manage-packages-mxdev-label`.
194
216
```
195
217
````
196
218
@@ -243,10 +265,5 @@ This way you always get the version that's currently available in the source con
243
265
```{include} /_inc/_build-and-restart.md
244
266
```
245
267
246
-
In your web browser, and assuming you are currently logged in as an administrator, visit the URL http://localhost:8080/Plone/prefs_install_products_form.
247
-
248
-
Then click the {guilabel}`Install` button next to your add-on to complete installation of the add-on.
249
-
250
-
Some add-ons have configuration options.
251
-
To configure such add-ons, return to the {guilabel}`Site Setup` control panel.
252
-
At the bottom of the page, you should see the heading {guilabel}`Add-on Configuration`, and a control panel to configure the add-on that you just installed.
Copy file name to clipboardExpand all lines: docs/admin-guide/override-core.md
+7-17Lines changed: 7 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,11 +16,11 @@ Sometimes you will need to override one or more package versions to fix a bug.
16
16
17
17
## Override the version of a core Plone package
18
18
19
-
The Python packages which are dependencies of Plone are pinned to specific versions at the time a Plone release is created.
19
+
Plone's Python package dependencies are pinned to specific versions at the time a Plone release is created.
20
20
This section describes how to override the version of one of these packages, in case you need a newer one.
21
21
22
22
```{caution}
23
-
By doing this, you are intentionally using a combination of package versions that has not been tested by the Plone development team.
23
+
When you override package versions, the combination of packages isn't tested by the Plone development team.
24
24
Use at your own risk!
25
25
```
26
26
@@ -37,11 +37,10 @@ For projects created with Cookieplone, select the tab labeled:
37
37
```
38
38
39
39
`````{tab-set}
40
-
41
40
````{tab-item} uv
42
41
:sync: uv
43
42
44
-
Edit `constraint-dependencies` in the file {file}`pyproject.toml`.
43
+
In the file {file}`pyproject.toml`, under the table `[tool.uv]`, edit `constraint-dependencies`.
45
44
This example uses `plone.api`.
46
45
47
46
```
@@ -50,13 +49,12 @@ constraint-dependencies = [
50
49
"plone.api==2.0.0a3",
51
50
]
52
51
```
53
-
54
52
````
55
53
56
54
````{tab-item} pip
57
55
:sync: pip
58
56
59
-
Add a version override to the file {file}`backend/mx.ini`.
57
+
In the file {file}`backend/mx.ini`, under the `[settings]` section, add `version-overrides` setting.
60
58
This example uses `plone.api`.
61
59
62
60
```
@@ -67,9 +65,8 @@ version-overrides =
67
65
68
66
```{seealso}
69
67
The {file}`mx.ini` file configures a tool called {term}`mxdev`.
70
-
For an explanation of why Plone uses `mxdev`, see {ref}`manage-packages-mxdev-label`.
68
+
For an explanation of why Plone uses mxdev, see {ref}`manage-packages-mxdev-label`.
71
69
```
72
-
73
70
````
74
71
75
72
````{tab-item} Buildout
@@ -98,11 +95,9 @@ plone.api = 2.0.0a3
98
95
```
99
96
100
97
```{note}
101
-
The version pins specified in the `[versions]` section will take precedence over the pins inherited from `https://dist.plone.org/release/6-latest/versions.cfg`.
98
+
The version pins specified in the `[versions]` section will take precedence over the pins inherited from https://dist.plone.org/release/6-latest/versions.cfg.
102
99
```
103
-
104
100
````
105
-
106
101
`````
107
102
108
103
### Install the package
@@ -128,7 +123,6 @@ For projects created with Cookieplone, select the tab labeled:
128
123
```
129
124
130
125
`````{tab-set}
131
-
132
126
````{tab-item} uv
133
127
:sync: uv
134
128
@@ -146,7 +140,6 @@ Add the local directory to your uv project as an editable package.
146
140
cd backend
147
141
uv add --editable ../plone.restapi
148
142
```
149
-
150
143
````
151
144
152
145
````{tab-item} pip
@@ -164,9 +157,8 @@ extras = test
164
157
165
158
```{seealso}
166
159
The {file}`mx.ini` file configures a tool called {term}`mxdev`.
167
-
For an explanation of why Plone uses `mxdev`, see {ref}`manage-packages-mxdev-label`.
160
+
For an explanation of why Plone uses mxdev, see {ref}`manage-packages-mxdev-label`.
168
161
```
169
-
170
162
````
171
163
172
164
````{tab-item} Buildout
@@ -207,9 +199,7 @@ Setting an empty version ensures that the copy of `plone.restapi` from source co
207
199
```{seealso}
208
200
This approach uses the [`mr.developer`](https://pypi.org/project/mr.developer/) Buildout extension.
Copy file name to clipboardExpand all lines: docs/conceptual-guides/package-management.md
+22-19Lines changed: 22 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ myst:
11
11
12
12
Plone 6 consists of a collection of Python and Node.js packages.
13
13
Over the decades of its existence, Plone has used several package management tools, sometimes multiple tools at one time.
14
-
Each one has its strengths and weaknesses for performing specific tasks, such as installation, conflict resolution, updates and upgrades, and working with virtual environments and across platforms.
14
+
Each one has its strengths and weaknesses for performing specific tasks, such as installation, conflict resolution, updates, upgrades, and working with virtual environments and across platforms.
15
15
16
16
With Volto as the default frontend in Plone 6, first npm, then pnpm, was brought into the mix as a package manager for its Node.js packages.
17
17
@@ -26,6 +26,21 @@ Python itself has a complex and convoluted history with package management, as [
26
26
27
27
## Manage backend Python packages
28
28
29
+
uv, pip with mxdev, and buildout are supported tools to manage the Python packages in the Plone backend.
30
+
The following sections explain each of these tools in more detail.
31
+
32
+
33
+
### uv
34
+
35
+
{term}`uv` is a package manager which is popular for its speed, its ability to manage the installation of Python itself, and its ability to consistently reproduce installed packages using a {file}`uv.lock` file.
36
+
37
+
When a project is fully managed using uv, it is configured in its {file}`pyproject.toml` file, and its packages are installed using `uv sync`.
38
+
39
+
uv also has a [pip interface](https://docs.astral.sh/uv/pip/), and installs packages into a virtual environment via the command `uv pip install`.
40
+
41
+
If you create a Plone project using Cookieplone, it creates a backend managed by uv.
42
+
43
+
29
44
### pip
30
45
31
46
By convention in the Python community, {term}`pip` is commonly used to install Python packages.
@@ -49,37 +64,26 @@ As a best practice, pip should always be used inside a specific Python {term}`vi
49
64
50
65
During development, it is sometimes necessary to override the Plone version constraints.
51
66
This makes it possible to:
52
-
- install a newer version of a core Plone package that was released with a bugfix
53
-
- install an unreleased core Plone package from a source control system
67
+
-{ref}`install a newer version of a core Plone package that was released to PyPI <install-an-add-on-from-pypi-label>` with a bugfix
68
+
-{ref}`install an unreleased core Plone package from a source control system <install-an-add-on-from-source-label>`
54
69
55
-
Unfortunately pip does not allow overriding constraints this way.
70
+
pip does not allow overriding constraints this way.
56
71
{term}`mxdev` solves this issue.
57
72
58
-
`mxdev` resolves Plone constraints according to your needs for pinning versions or source checkouts.
73
+
mxdev resolves Plone constraints according to your needs for pinning versions or source checkouts.
59
74
It reads its configuration file {file}`mx.ini`, and your {file}`requirements.txt` and {file}`constraints.txt` files.
60
75
Then it fetches the requirements and constraints of Plone.
61
76
Finally, it writes new combined requirements in {file}`requirements-mxdev.txt` and new constraints in {file}`constraints-mxdev.txt`.
62
77
Together these two files contain the combined requirements and constraints, but modified according to the configuration in {file}`mx.ini`.
63
78
The generated files indicate from where the constraints were fetched, and comments are added when a modification was necessary.
64
79
65
-
`mxdev` does not run `pip` or install packages.
80
+
mxdev does not run pip or install packages.
66
81
You or your development tools, such as GNU Make, must perform that step.
67
82
68
83
```{seealso}
69
84
{doc}`/admin-guide/add-ons`
70
85
```
71
86
72
-
### uv
73
-
74
-
More recently, {term}`uv` has become popular as a way to install Python packages.
75
-
This package manager is popular for its speed, its ability to manage the installation of Python itself, and its ability to consistently reproduce installed packages using a {file}`uv.lock` file.
76
-
77
-
When a project is fully managed using uv, it is configured in `pyproject.toml` and the packages are installed using `uv sync`.
78
-
79
-
uv also has a backwards-compatible mode which works more like pip, and installs packages into a virtual environment via the command `uv pip install`.
80
-
81
-
If you create a Plone project using Cookieplone, it creates a backend managed by uv.
82
-
83
87
### buildout
84
88
85
89
{term}`Buildout` is a tool for installing Python packages that has been used in the Plone community since about 2007, and is still preferred by some members of the community.
@@ -89,9 +93,8 @@ It not only installs packages, but can set up other things using an extensible s
89
93
Buildout does not install Python packages into a virtual environment.
90
94
Instead, it creates scripts that add the necessary packages to `sys.path` before running the script target.
91
95
92
-
## Manage frontend Node.js packages
93
96
94
-
### pnpm
97
+
##Manage frontend Node.js packages
95
98
96
99
Plone uses {term}`pnpm` to install Node.js packages.
0 commit comments