Skip to content
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

"setup_requires" in setup.py doesn't follow pip --index-url #238

Open
thombet opened this issue Feb 16, 2022 · 0 comments
Open

"setup_requires" in setup.py doesn't follow pip --index-url #238

thombet opened this issue Feb 16, 2022 · 0 comments

Comments

@thombet
Copy link

thombet commented Feb 16, 2022

Hello,

We ran into an problem today when trying to install pygerrit2.
In our company we have a strict proxy policy which prevents us from downloading pip packages from the official public PyPI repository.
Instead we have a company mirror of PyPI that we can use when calling pip: we only need to provide the argument --index-url (details).

Nevertheless, when calling pip install --index-url <server_url> -r requirements.txt where requirements.txt contain pygerrit2 we got an error because when installing pygerrit2, the command python setup.py egg_info tries to download pdb from the public PyPI instead of our company mirror. In other words the argument --index-url is ignored when the setup.py of pygerrit2 is run.

It looks like the problem comes from the use of setup_requires in pygerrit setup.py as explained here and here.
Extracts:

WARNING
Beware of the setup_requires keyword arg in setup.py.
The (rare) packages that use it will cause those dependencies to be downloaded by setuptools directly,
skipping pip’s hash-checking. If you need to use such a package, see Controlling setup_requires.

To workaround this issue we had to create a .pydistutils.cfg file with index-url but I thought you would want to fix this as other users may face similar issues.

I am not sure why it was not reported before by the way because it looks like it was reported in other pip packages: https://www.twistedmatrix.com/trac/ticket/9189

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant