Skip to content

Commit 6c9128b

Browse files
committed
Update mxdev files with installed defaults, with a single modification for collective.easyform.
Update instructions to use make instead of mxdev.
1 parent 7229700 commit 6c9128b

File tree

1 file changed

+24
-23
lines changed

1 file changed

+24
-23
lines changed

docs/install/manage-add-ons-packages.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ For developing add-ons for the Plone frontend, Volto, see {doc}`volto/addons/ind
180180

181181
(manage-the-problem-with-pip-label)=
182182

183-
### The problem with pip
183+
### The problem with `pip`
184184

185185
If you want to check out a Plone core package for development, or want to override the constraints of Plone, normally you would define constraints with a file {file}`constraints.txt` to tell `pip` to install a different version of a Plone package.
186186

@@ -214,58 +214,59 @@ You must perform that step.
214214
### `mxdev` example files
215215

216216
A minimal example set of files for `mxdev` would look like the following.
217+
In this example, you will install an add-on `collective.easyform`.
217218

218219
{file}`requirements.txt`
219220

220221
```ini
221222
-c constraints.txt
223+
-e src/project_title
222224

223-
Plone
225+
zope.testrunner
224226

225-
# List of add-ons that are needed.
227+
# Add required add-ons
226228
collective.easyform
227229
```
228230

229231
{file}`constraints.txt`
230232

231233
```ini
232234
-c https://dist.plone.org/release/{PLONE_BACKEND_VERSION}/constraints.txt
233-
234-
# constraints of add-ons
235-
collective.easyform==3.4.5
236235
```
237236

238237
{file}`mx.ini`
239238

240239
```ini
241-
[settings]
242-
# constraints of Plone packages
243-
version-overrides =
244-
plone.api>=2.0.0a3
245-
246-
[plone.restapi]
247-
url = [email protected]:plone/plone.restapi.git
248-
branch = master
249-
extras = test
250-
```
240+
; This is a mxdev configuration file
241+
; it can be used to override versions of packages already defined in the
242+
; constraints files and to add new packages from VCS like git.
243+
; to learn more about mxdev visit https://pypi.org/project/mxdev/
251244

252-
With these three files in your project, run `mxdev` with the following commands.
245+
[settings]
246+
; example how to override a package version
247+
; version-overrides =
248+
; example.package==2.1.0a2
253249

254-
```shell
255-
mxdev -c mx.ini
250+
; example section to use packages from git
251+
; [example.contenttype]
252+
; url = https://github.com/collective/example.contenttype.git
253+
; pushurl = [email protected]:collective/example.contenttype.git
254+
; extras = test
255+
; branch = feature-7
256256
```
257257

258-
`mxdev` generates the files {file}`requirements-mxdev.txt` and {file}`constraints-mxdev.txt`.
259-
Now you can install your packages with `pip` and the new requirements file:
258+
With these three files in your project, you can generate package requirements and constraints files, and then install those packages.
260259

261260
```shell
262-
pip install -r requirements-mxdev.txt
261+
make build-backend
263262
```
264263

264+
The `make` target invokes `mxdev`, which generates the files {file}`requirements-mxdev.txt` and {file}`constraints-mxdev.txt`.
265+
It then invokes `pip` to install packages with the new requirements file.
265266
Finally, to reload the packages, restart your Zope instance/Plone site with the following command.
266267

267268
```shell
268-
runwsgi instance/etc/zope.ini
269+
make start-backend
269270
```
270271

271272
```{seealso}

0 commit comments

Comments
 (0)