Skip to content

Commit 28298b9

Browse files
committed
Install from source: pin and checkout
1 parent c989678 commit 28298b9

File tree

2 files changed

+48
-8
lines changed

2 files changed

+48
-8
lines changed

docs/install/source-step-by-step.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ plone.api>=2.0.0a3
242242
Unfortunatly pip does not allow this way of overwriting constraints.
243243
244244
`mxdev` is made for assembling Plone constraints with your needs of version pinning or source checkouts.\
245-
It reads your {file}`constraints.txt`, fetches the constraints of Plone and writes a {file}`constraints-mxdev.txt` which combines the constraints. Comments on which Plone constraint is modified asure the readability.
245+
It reads your {file}`constraints.txt`, fetches the constraints of Plone and writes a {file}`constraints-mxdev.txt` which combines the constraints. Comments on which Plone constraint is modified assure the readability.
246246
% TODO language: 'readability'?
247247
248248
mxdev operates on three files to tell pip which packages to install with which version.

docs/install/source.md

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,33 +180,73 @@ pip install -r requirements.txt
180180
We could now build and run Zope / Plone with one command `make run`.
181181

182182

183+
### Checkout add-on
184+
185+
TODO checkout an add-on for development
186+
187+
183188
### Pin a Plone package to a higher version
184189

185190
% TODO describe how to modify constraints of Plone
186191

192+
If you want to override the constraints of Plone, this section is for you.
193+
194+
Pin the version of a Plone package in {file}`mx.ini`:
187195

196+
```ini
197+
[settings]
198+
# constraints of Plone packages
199+
version-overrides =
200+
plone.api>=2.0.0a3
201+
```
188202

189-
### Checkout a Plone package or add-on
203+
Apply the changes and install the package with the modified version with:
204+
205+
```shell
206+
make install
207+
```
208+
209+
Under the hood happens a creation of a new constraints file and an installation with pip. See the step-by-step chapter for more info: {ref}`install-source-checkout-and-pin`.
210+
211+
Et voilà. Zope can be restarted with `make run`.
212+
213+
214+
### Checkout a Plone package
190215

191216
% TODO describe how to checkout packages (Plone package or add-on)
192217

193-
### Build and start your instance
218+
If you want to checkout a Plone package (not add-on) for development, this section is for you.
194219

195-
We can now build and run Zope / Plone with one command:
220+
Add the Plone package you want to checkout in {file}`mx.ini`.
196221

197-
```shell
198-
make run
222+
```ini
223+
[plone.restapi]
224+
url = [email protected]:plone/plone.restapi.git
225+
branch = master
226+
extras = test
199227
```
200228

201-
Head over to http://localhost:8080/ and see that Plone is running.\
202-
You can now [create a Plone instance](install-source-create-plone-site-label) and enable the add-on `my.awesome.addon` in {guilabel}`Site Setup` [http://localhost:8080/Plone/prefs_install_products_form](http://localhost:8080/Plone/prefs_install_products_form).
229+
Apply the changes and install the package with the modified version with:
203230

231+
```shell
232+
make install
233+
```
204234

235+
Under the hood happens a creation of a new constraints file and an installation with pip. See the step-by-step chapter for more info: {ref}`install-source-checkout-and-pin`.
205236

237+
Et voilà. Zope can be restarted with `make run`.
206238

207239

240+
### Build and start your instance
208241

242+
We can now build and run Zope / Plone with one command:
209243

244+
```shell
245+
make run
246+
```
247+
248+
Head over to http://localhost:8080/ and see that Plone is running.\
249+
You can now [create a Plone instance](install-source-create-plone-site-label) and enable the add-on `my.awesome.addon` in {guilabel}`Site Setup` [http://localhost:8080/Plone/prefs_install_products_form](http://localhost:8080/Plone/prefs_install_products_form).
210250

211251

212252

0 commit comments

Comments
 (0)