-
-
Notifications
You must be signed in to change notification settings - Fork 39
Description
I have check-manifest installed in a Buildout (the core Plone development buildout). Running check-manifest works in some repos (plone.api) but not in others (zope.interface):
$ ../../bin/check-manifest
['/Users/maurits/community/plone-coredev/6.1/bin/python3.12', '-m', 'build', '--sdist', '.', '--outdir', '/var/folders/26/1plvhxbs6yx7g_82v2xdxc500000gn/T/check-manifest-h6nvj8ay-sdist'] failed (status 1):
/Users/maurits/community/plone-coredev/6.1/bin/python3.12: No module named build
In the one that works, there is a pyproject.toml with this:
[build-system]
requires = ["setuptools>=68.2"]
The one where it fails, has this:
[build-system]
requires = ["setuptools<74"]
build-backend = "setuptools.build_meta"
The important difference is the build-backend line (which I might actually need to add in the first repo as well), as this makes check-manifest call python -m build. This fails because build is not available in the python. Buildout creates a script like this:
$ cat ../../bin/check-manifest
#!/Users/maurits/community/plone-coredev/6.1/bin/python3.12
import sys
sys.path[0:0] = [
...
'/Users/maurits/shared-eggs/cp312/check_manifest-0.49-py3.12.egg',
'/Users/maurits/shared-eggs/cp312/build-1.2.2.post1-py3.12.egg',
...
So the build module is available in the script, but not in the Python.
If check-manifest is installed in a Python venv instead of by Buildout it should work fine. But maybe check-manifest could take over some lines from zest.releaser which imports the build module to use it in Python code.
The alternative would be for me (and others who have this problem) to pip install build in the venv that Buildout uses. I already think it likely that I will add build as dependency of zc.buildout 4, which would also solve this.