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
update to bootstrap.py #321
Comments
+1 |
We had to pin it to 33.1.1 in bootstrap-buildout.py (thank god we have |
The PyPA people did warn us about it and asked our opinion in buildout issue #306. Meanwhile https://bootstrap.pypa.io/ez_setup.py (which is used by our The deprecation warning that For the record,
|
We had an installation that still needed to use the I wasn't a big fan of giving up on |
Oh no. It is the last thing I want to do. Why then need a buildout if in most cases enough only "venv + pip + requirements.txt"? I like a buildout because it requires only two command to prepare an environment for a project:
|
We could always write a new bootstrap that uses All that is necessary is to do the Python equivalent of this shell snippet:
of course, the Another tweak to the above sequence is to create a local virtualenv and use that to install buildout. Again, imagine the python equivalent of:
A new bootstrap script that did just the above would work right now, with no changes to buildout. The possibilities are endless. There's no need to give up on buildout bootstrapping. |
Quoting @Cykooz:
If you only need to install some packages, then virtualenv, pip, and a requirements file are the simplest way, and probably faster. In such a case I would only use buildout because I am used to it. For me the extra value that buildout gives, is in what it allows the recipes to do: running commands, creating custom scripts, creating config files from templates, etcetera. |
Quoting @leorochael:
Such a bootstrap should use
Sure, there are possibilities. And let me not create stop energy for anyone wanting to improve the bootstrapping. |
Indeed. Recent experimental tools like pipenv are trying to make this whole workflow more intuitive and simple (it's debatable since it's another layer, but...). |
FYI @hvelarde Plone installations that have somehow |
@idgserpro thanks! I already stumbled upon this. |
It looks like this was fixed by a newer setuptools version. Does anyone disagree that this can be closed? |
bootstarp.py is not a main problem. The main problem is that buildout not work with setuptools 34+. Because buildout suggests that setuptools does not require other packages. For example the code form zc/buildout/easy_install.py:
This code adds into sys.path only path for setuptools but not for dependencies of setuptools. |
I see. Thanks. So there seem to be some straightforward fixes: a) Require setuptools < 34. This is probably a quick fix in the short term.
b) Change buildout to take into account that setuptools has dependencies. |
Well, a) won't work. There's something stupid going on. When an old buildout tries to upgrade, it gets the new buildout, but fails to take its requirement into account when it gets setuptools. :( I'll explore plan b tomorrow. |
If you look into that, do you mind also looking at #312? Should be in the same place in the code. |
Yes, I mind. This fix is urgent. |
Is anyone going to review #323? |
Well, sure, this symptom is a lot more urgent, but this issue and #312 are just symptoms of the same underlying bug: the buildout upgrade process and the buildout bootstrap process both make wrong assumptions about the (recursive) dependencies of buildout itself and where they are located in the file system. Fixing them both at the same time should take the same amount of time and energy than fixing just one of them and from a quick look at #323 it might have fixed #312 accidentally. It'd be a shame if it didn't...
I'll try to take a look at it tomorrow |
This fix has nothing to do with the bootstrapping process, which wasn't broken (for now). I'm not sure I'll wait till tomorrow. BTW, I'm working on a fix (tests) for Python 3.6. |
Released zc.buildout-2.6.0 |
Thanks a lot Jim... a minot issue zc.buildout 2.6.0 is writing itself (as well as setuptools ) to the version.cfg file after bootstraping even though they are already in the file. Carlos |
Yup: #326 |
Fixed released in 2.7.1 |
Thanks a lot Jim Carlos |
@mauritsvanrees we still think there's room for improvement at least for more documentation for people that don't follow setuptools/buildout development and just download bootstrap.py and expect it to work. Usually when someone is using bootstrap.py and the buildout breaks (specially after a new setuptools release), one of the normal actions is to download latest bootstrap from https://bootstrap.pypa.io/bootstrap-buildout.py and run it again. Can we have a message like this:
In bootstrap.py? We would do a PR but we still don't have a signed contributor's agreement yet, so that's why we're asking for help. And don't forget to change buildout/bootstrap/bootstrap.py Line 28 in 9ba1e31
|
This doesn't make sense to me. This case wasn't a bootstrapping failure. Any existing buildout that upgraded was also broken. Perhaps we need an option to disable automatic upgrades. And/or perhaps it would be interesting to provide a means to downgrade to the state before an upgrade. |
Indeed. We've addressed the message in ez_setup.py itself.
Is it feasible to create a zip/tar.gz of |
That sounds pretty heavy handed. I was simply pondering remembering the previous versions of buildout and setuptools and having an option to downgrade to the previous versions. If this was invoked, it would likely imply somehow recording the versions in the versions section. It might be simpler to just disable automatic upgrading, which hasn't been the most popular feature. :) Not automatically upgrading when buildout and setuptools aren't pinned violates repeatability, although hopefully buildout and setuptools are stable enough at this point that that doesn't matter so much. |
setuptools 34.0.0 just introduced 3 new deps and deprecated the ez_setup.py (pinned to 33.1.1). I am not sure if bootstrap.py can be updated to reflect the setuptools upgrade.
Carlos
The text was updated successfully, but these errors were encountered: