a 'make help' could help
The dev setup without buildout could be awesome. how about a 'make help'? and a 'make clean-xy' (I get several errors)
% make install
Makefile:163: warning: undefined variable 'OS'
Makefile:426: warning: undefined variable 'SOURCES'
Install python packages
error: Couldn't parse requirement in `requirements-mxdev.txt` at position 321
Caused by: Expected path (`./src/plone.distribution`) to end in a supported file extension: `.whl`, `.tar.gz`, `.zip`, `.tar.bz2`, `.tar.lz`, `.tar.lzma`, `.tar.xz`, `.tar.zst`, `.tar`, `.tbz`, `.tgz`, `.tlz`, or `.txz`
./src/plone.distribution[test]
% make run
Makefile:163: warning: undefined variable 'OS'
Makefile:426: warning: undefined variable 'SOURCES'
Setup Python Virtual Environment using module 'venv' at '.venv'
Looking in links: /var/folders/jp/b_42_w2s5ss_m87wcrktdp380000gn/T/tmph4yt6jls
Requirement already satisfied: pip in ./.venv/lib/python3.12/site-packages (24.0)
Install uv
Collecting uv
Using cached uv-0.6.13-py3-none-macosx_10_12_x86_64.whl.metadata (11 kB)
Using cached uv-0.6.13-py3-none-macosx_10_12_x86_64.whl (16.2 MB)
Installing collected packages: uv
Successfully installed uv-0.6.13
[notice] A new release of pip is available: 24.0 -> 25.0.1
[notice] To update, run: pip install --upgrade pip
Resolved 3 packages in 105ms
Prepared 3 packages in 7ms
Uninstalled 1 package in 102ms
Installed 3 packages in 30ms
- pip==24.0
+ pip==25.0.1
+ setuptools==78.1.0
+ wheel==0.45.1
Install/Update MXStack Python packages
⠦ mxdev==4.0.3 error: Failed to fetch: `https://pypi.org/simple/mxmake/`
Caused by: HTTP status server error (503 Service Unavailable) for url (https://pypi.org/simple/mxmake/)
% make install
Makefile:163: warning: undefined variable 'OS'
Makefile:426: warning: undefined variable 'SOURCES'
Setup Python Virtual Environment using module 'venv' at '.venv'
Looking in links: /var/folders/jp/b_42_w2s5ss_m87wcrktdp380000gn/T/tmpep5wn4s8
Requirement already satisfied: pip in ./.venv/lib/python3.12/site-packages (25.0.1)
Install uv
Requirement already satisfied: uv in ./.venv/lib/python3.12/site-packages (0.6.13)
Resolved 3 packages in 139ms
Audited 3 packages in 3ms
Install/Update MXStack Python packages
Resolved 14 packages in 45.98s
Prepared 14 packages in 143ms
Installed 14 packages in 35ms
+ blessed==1.20.0
+ editor==1.6.6
+ inquirer==3.4.0
+ jinja2==3.1.6
+ markupsafe==3.0.2
+ mxdev==4.0.3
+ mxmake==1.1.0
+ packaging==24.2
+ pyyaml==6.0.2
+ readchar==4.2.1
+ runs==1.2.2
+ six==1.17.0
+ wcwidth==0.2.13
+ xmod==1.8.1
Checkout project sources
###############################################################################
mxmake: hook initialized
# Load configuration
###############################################################################
# Read infiles
Read [r]: requirements-test.txt
Read [c]: constraints-all.txt
Read [c]: constraints.txt
Read [c]: https://zopefoundation.github.io/Zope/releases/5.13/constraints.txt
Read [c]: constraints-extra.txt
Read [c]: constraints-ecosystem.txt
###############################################################################
# Fetch sources from VCS
Queued 'Plone' for checkout.
Queued 'Products.CMFPlone' for checkout.
Queued 'docs' for checkout.
Queued 'mockup' for checkout.
Queued 'plone.app.locales' for checkout.
Queued 'plone.app.upgrade' for checkout.
Cloned 'Plone' with git using branch 'master' from 'https://github.com/plone/Plone.git'.
Cloned 'mockup' with git using branch 'master' from 'https://github.com/plone/mockup.git'.
Cloned 'Products.CMFPlone' with git using branch '6.1.x' from 'https://github.com/plone/Products.CMFPlone.git'.
Cloned 'plone.app.upgrade' with git using branch 'master' from 'https://github.com/plone/plone.app.upgrade.git'.
Cloned 'docs' with git using branch '6.0' from 'https://github.com/plone/documentation.git'.
Initialized 'docs' submodule at 'submodules/plone.api' with git.
Initialized 'docs' submodule at 'submodules/plone.restapi' with git.
Initialized 'docs' submodule at 'submodules/volto' with git.
Cloned 'plone.app.locales' with git using branch 'master' from 'https://github.com/collective/plone.app.locales.git'.
###############################################################################
# Write outfiles
Write [c]: constraints-mxdev.txt
Write [r]: requirements-mxdev.txt
mxmake: No templates defined
🎂 You are now ready for: pip install -r requirements-mxdev.txt
(path to pip may vary dependent on your installation method)
Install plone.releaser
⠦ Resolving dependencies... error: Failed to fetch: `https://pypi.org/simple/plone-releaser/`
Caused by: HTTP status server error (503 Service Unavailable) for url (https://pypi.org/simple/plone-releaser/)
make: *** [include.mk:6: .mxmake/sentinels/plonereleaser.sentinel] Error 2
a 'make help' would also print that there is no 'make start' but a 'make run'.
I got it running.
If I can help with the 'make help', just ping me. I don't want to fiddle with the Makefile if the authors have strong opinions about how it should look like.
I think this is based on mxmake, which got a help system added recently: https://github.com/mxstack/mxmake/pull/44
I am not very familiar with mxmake. Maybe @jensens has tips for how to update it?
just run uvx mxmake init and do not change anything but check core/help.
just run
uvx mxmake initand do not change anything but check core/help.
If I get you right, you point contributors to https://github.com/plone/buildout.coredev/blob/6.1/README-make.md That's fine. The README-make.md explains how it goes.
I wonder if the use of the Makefile and the setup without buildout should be mentioned in the documentation: https://6.docs.plone.org/contributing/core/#install-plone-core-for-development Maybe buildout-less setup can already replace the buildout instructions in the documentation on how to contribute to core. ^ @stevepiercy
Sorry, I'm not familiar with the buildout vs. mxmake machinery. I think some kind of write-up in the Plone 6 Documentation is needed, but I don't know exactly what or where.
That said, https://6.docs.plone.org/contributing/core/#install-plone-core-for-development is for contributing to Plone core. @ksuess do you mean instead developing via pip or buildout?
@stevepiercy I am talking about contributing to core.
We can set up Plone for contributing to core like done since years with buildout. This is explained here https://6.docs.plone.org/contributing/core/#install-plone-core-for-development. We can still do.
Or we can use the new Makefile (Sept 2024 https://github.com/plone/buildout.coredev/commit/f13c4c58f22d07203f6144f36ef406fc0b43f705#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52) to set up Plone for contributing to core WITHOUT buildout, made by @mauritsvanrees and @jensens with mxmake, mxdev, uv, etc.. It's a great relief to go without buildout, IMHO.
If included in docs.plone.org, new contributors do not have to learn buildout.
Those who have a set up running, do not need to switch, as the setup with buildout is still OK.
@ksuess yes, please! Let's promote it as recommended, and deprecate buildout as "at your own risk". I'd appreciate a PR that we can review.
I'd suggest this structure, renaming that heading slightly.
## Install Plone core for contributing
New method name TBD is the preferred method to install Plone core for contributing.
Buildout will be deprecated in Plone 6.2, and will no longer receive support for Plone installations in Plone 7. (This sentence probably requires a PLIP, but YOLO!)
### New method name TBD
versionadded admonition
How to guide for TBD.
### Buildout
deprecated admonition
existing content
Buildout will be deprecated in Plone 6.2, and will no longer receive support for Plone installations in Plone 7. (This sentence probably requires a PLIP, but YOLO!)
It definitely needs a PLIP. There is still significant use of buildout within the community, especially for Classic UI projects.
There are also some parts of the Plone development and release process that still depend on the coredev buildout. For example the Jenkins test runs use a command that is created by this buildout to run tests from all Plone packages. The intention is to replace all those things with Makefile commands, but that's not done yet.
I'm fine with recommending that contributors use the Makefile commands, but it's a bit premature to say the buildout is deprecated.
So I will pick up and continue with https://github.com/plone/documentation/pull/1936 for recommending that contributors use the Makefile commands which go without buildout.
If I get you right, you point contributors to https://github.com/plone/buildout.coredev/blob/6.1/README-make.md That's fine. The README-make.md explains how it goes.
What I meant is I added a help feature to mxmake, it just need to be activated for the Makefile as mentioned above.
Then make help works.
Done and pushed to 6.2 branch.
@ksuess I think this can be closed now?
@jensens I tried it and see output like this:
DOMAIN 'zope' (topic Applications)
Zope and Plone application related
TARGETS
zope-instance
zope-start
zope-debug
zope-runscript
zope-adduser
zope-dirty
zope-clean
zope-purge
Is there a way to show a description for each target?
@jensens I tried it and see output like this:
...
Is there a way to show a description for each target?
At the very end it states
Need detailed help by domain containing all information?
Run:
make help HELP_DOMAIN=<domain>
try:
make help HELP_DOMAIN=zope
then you get
Help for domain 'zope'
DOMAIN 'zope' (topic Applications)
Zope and Plone application related
TARGETS
zope-instance
Use cookiecutter-zope-instance to create Zope- and its WSGI-
configuration from values of the cookiecutter configuration file.
zope-start
Start Zope/Plone WSGI server.
zope-debug
Start Zope/Plone debug console.
zope-runscript
Run a script within Zope/plone context. ZOPE_SCRIPTNAME must be set to
the script to run. This can be done by setting the environment variable
or by setting the make variable in the header. Example: `make
ZOPE_SCRIPTNAME=./my-script.py zope-runscript`
zope-adduser
Adds an [emergency user](https://zope.readthedocs.io/en/latest/zopebook
/Security.html#zope-emergency-user) to Zope. This is an user with the
Manager role created in the Zope application roots user folder! This is
not meant to do user management, but to get access to a Zope site if
all other passwords are gone. The user name must not exist already in
the application roots user folder. ZOPE_USER_NAME and
ZOPE_USER_PASSWORD should not be set in the Makefile, but passed in as
environment variables. Example: `make ZOPE_USER_NAME=emergency
ZOPE_USER_PASSWORD=verysecret adduser`
zope-dirty
Touches the configuration file to force a rebuild of the Zope instance.
zope-clean
Removes generated configuration files but keeps Zope database.
zope-purge
Removes the whole Zope instance folder including database.
ARGUMENTS
ZOPE_CONFIGURATION_FILE=instance.yaml
cookiecutter configuration file to use
ZOPE_TEMPLATE=https://github.com/plone/cookiecutter-zope-instance
cookiecutter configuration file to use
ZOPE_TEMPLATE_CHECKOUT=main
cookiecutter branch, tag or commit to checkout from the ZOPE_TEMPLATE.
If empty, `--checkout` is not passed to cookiecutter.
ZOPE_BASE_FOLDER=.
The Zope folder "instance" will be generated relative to this existing
folder.
ZOPE_SCRIPTNAME=No Default
script to run
ZOPE_USER_NAME=No Default
user name to create
ZOPE_USER_PASSWORD=No Default
user name to create