This is especially important for onboarding new developers for summer of code. Background, I'm running a workshop this week to introduce a few newbies to working with coredev.
The solution was to unpin setuptools in versions.cfg
and unpin lazr.restfulclient in tests.cfg. After that the build worked.
meaning set the setuptools line equal to nothing and same for the lazr.restfulclient line
in versions.cfg
setuptools =
in tests.cfg
lazr.restfulclient =
This would not be a good experience for a new developer,
Traceback (most recent call last):
File "/home/ubuntu/workspace/plone5devel/parts/instance/bin/interpreter", line 278, in <module>
exec(compile(__file__f.read(), __file__, "exec"))
File "/home/ubuntu/workspace/plone5devel/eggs/Zope2-2.13.23-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
run()
File "/home/ubuntu/workspace/plone5devel/eggs/Zope2-2.13.23-py2.7.egg/Zope2/Startup/run.py", line 17, in run
import Zope2.Startup
File "/home/ubuntu/workspace/plone5devel/eggs/Zope2-2.13.23-py2.7.egg/Zope2/__init__.py", line 60, in <module>
from Zope2.Startup.run import configure
File "/home/ubuntu/workspace/plone5devel/eggs/Zope2-2.13.23-py2.7.egg/Zope2/Startup/__init__.py", line 28, in <module>
from zope.processlifetime import ProcessStarting
ImportError: No module named processlifetime
I'm almost sure I shouldn't fix it this way, but since I saw that the zope.processlifetime package was missing I ran the following command:
Yes. I fixed this 2 weeks ago but @jensens broke it again by pinning a different setuptools version in versions.cfg than is installed via requirements.txt, despite the documentation comment.
Please make sure the versions in these two files are in sync and that at least resolves the infinite loop you're getting.
That happens if you introduce a second way of doing things without removing the first way. Usually Jenkins would have catched an error like this but since Jenkins uses the old bootstrap.py approach this did not happen. We could of course test both ways. Though, having two options for this (and testing both) is just nuts in the first place IMHO...
indeed, the world is not perfect especially if it come to things like pip/ setuptools and buildout/ bootstrap.py.
Fixing buildout to not loop would be the real solution.
Edit:
zope.processlifetime is a dependecy of Zope2 itself and should get pulled in while buildout.
Edit 2: lazr.restfulclient does not seems to be very well maintained at PyPI at all and lives primary on Launchpad. You may need to add an entry to find-links in buildout.
What is in the way to make requirements.txt to be the new default?
We are using it for several months and it has a few advantages together with our CI and internal best practices.
A few checkers can be installed without running buildout, these checks finish/fail much faster in CI
A manual check if a project uses an up to date buildout and setuptools is faster
This thread is not about replacing buildouts version section with a requirements.txt.
There is a discussion in a bug on zc.buildout about this, but not here.
Here we talk about replacing bootstrap.py with requirements.txt as a possible new default.
The requirements.txt is just for bootstrapping zc.buildout, so it would contain version pins for setuptools and for zc.buildout.
Then python bootstap.py bin/buildout
becomes pip install -r requirements bin/buildout
What would be in requirements.txt then? Just zc.buildout and setuptools or all the dependencies and version pins? If we would do that wouldn't it make sense to make this the default in zc.buildout itself as well? I'm concerned that if people look into the zc.buildout docs they will find different information than in buildout.cordev docs. This will cause even more confusion...we are adding layers over layers and hope to make things simpler by this...