I have tested it a bit more on the Plone coredev buildout, with Python 3.9.9 on macOS Catalina (10.15). All seems good. Some notes.
This is in the requirements.txt
:
setuptools==62.0.0
zc.buildout==3.0.0rc3
pip==22.0.4
wheel==0.37.1
Those versions are also in versions.cfg
.
I have tested it with several different pins in versions.cfg
, pinning ever older setuptools versions:
# setuptools = 62.0.0
# setuptools = 61.3.1
# setuptools = 61.0.0
# setuptools = 60.10.0
# setuptools = 59.8.0
setuptools = 58.0.0
All went well, the buildout always finished.
What always happens in this case when the version of setuptools in pip differs from the one in the buildout versions, is that you get this during the buildout run:
Upgraded:
setuptools version 58.0.0;
Restarting.
This happens once, unless you change the version pin again. Afterwards, the bin/buildout
script has setuptools
in its eggs list, so it no longer uses the setuptools installed by pip.
It still gets zc.buildout
from pip. If you change this version in versions.cfg
, you get this message:
Upgraded:
zc.buildout version 3.0.0rc2;
Restarting.
Afterwards, the bin/buildout
script is unchanged: it still uses the pip version. When you re-run buildout, you get the same "Upgraded and restarting" message again.
So the bin/buildout
script can update itself permanently to use a different setuptools
version, but not to use a different zc.buildout
version: that is only done temporarily. In fact, when I pause execution after the "Restarting" message, this is the contents of bin/buildout
:
#!/Users/maurits/community/plone-coredev/6.0/bin/python3.9
import sys
sys.path[0:0] = [
'/Users/maurits/shared-eggs/cp39/zc.buildout-3.0.0rc2-py3.9.egg',
'/Users/maurits/community/plone-coredev/6.0/lib/python3.9/site-packages',
]
import zc.buildout.buildout
if __name__ == '__main__':
sys.exit(zc.buildout.buildout.main())
When buildout finishes, the original contents are restored, so it again uses the buildout version from pip.
This is a bit unexpected, and maybe it could/should be fixed. But it is not necessarily good or bad. Mostly I am glad that I did not see buildout restarting itself again and again in the same run.
But the advice is clear: you should pin the same versions for zc.buildout
and setuptools
in versions.cfg
and requirements.txt
or constraints.txt
.
So: for me, on this machine, it works fine.