Skip to content

a 'make help' could help #1014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ksuess opened this issue Apr 8, 2025 · 14 comments · May be fixed by plone/documentation#1936
Open

a 'make help' could help #1014

ksuess opened this issue Apr 8, 2025 · 14 comments · May be fixed by plone/documentation#1936

Comments

@ksuess
Copy link
Member

ksuess commented Apr 8, 2025

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
@ksuess
Copy link
Member Author

ksuess commented Apr 8, 2025

a 'make help' would also print that there is no 'make start' but a 'make run'.

@ksuess
Copy link
Member Author

ksuess commented Apr 9, 2025

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.

@davisagli
Copy link
Member

I think this is based on mxmake, which got a help system added recently: mxstack/mxmake#44

I am not very familiar with mxmake. Maybe @jensens has tips for how to update it?

@jensens
Copy link
Member

jensens commented Apr 16, 2025

just run uvx mxmake init and do not change anything but check core/help.

@ksuess
Copy link
Member Author

ksuess commented Apr 16, 2025

just run uvx mxmake init and 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

@stevepiercy
Copy link
Contributor

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?

@ksuess
Copy link
Member Author

ksuess commented Apr 16, 2025

@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 f13c4c5#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.

@stevepiercy
Copy link
Contributor

@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

@davisagli
Copy link
Member

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.

@ksuess
Copy link
Member Author

ksuess commented Apr 18, 2025

So I will pick up and continue with plone/documentation#1936 for recommending that contributors use the Makefile commands which go without buildout.

@jensens
Copy link
Member

jensens commented Apr 22, 2025

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.

@jensens
Copy link
Member

jensens commented Apr 22, 2025

Done and pushed to 6.2 branch.

@jensens
Copy link
Member

jensens commented Apr 22, 2025

@ksuess I think this can be closed now?

@davisagli
Copy link
Member

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants