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
improve index_url passing for setup_requires #238
base: master
Are you sure you want to change the base?
Conversation
Can you add a test so that we understand what you are trying to achieve ? |
Not easily. Test setup requires a local pypiserver, and the ability to prevent access to pypi.python.org in some way. I accomplished that by setting a bogus entry for pypi.python.org in my /etc/hosts file for a while. With that setup:
First, bootstrap with access to pypi.python.org open. Then, remove access to pypi.python.org. Then buildout. If pypi.python.org is inaccessible, the build will fail because of the setup_requires entry for "pbr" here Unfortunately, buildout can't get the list of setup_requires eggs without triggering the download and install of those eggs. So, setup_requires dodge buildout's index url and version pinning, right now. This patch improves the situation a little bit by asking the egg to use the correct index url for setup_requires eggs. Internally, we use a bootstrap that pulls ez_setup.py from a bandersnatch mirror instead of bootstrap.pypi.io, and an ez_setup.py that pulls setuptools from the local bandersnatch mirror as well. Our goal is to keep our builds entirely isolated from pypi.python.org reliability issues. |
The idea looks good in principle and I can see what you're trying to achieve. But: why cannot buildout figure out the If so, perhaps setuptools could be changed to allow it. That would get the version pinning working, too. |
See also my comment #244 (comment) |
@reinout as stated in the setuptools documentation, So I don't think it necessary to But it would be a great idea the @jonathanultis 's idea is great! |
b8ad13b
to
5db2e99
Compare
4 tests fail in master before and after this patch.
This patch makes setuptools respect the index_url for setup_requires entries. They still won't respect the versions list. But this is a little better.
It fixes an issue with cliff and stevedore, which use the pbr library to share setup logic.