-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
--pip-args not passed to pip installing setuptools #1781
Comments
Experiencing the same problem when trying to use a constraints file with My workaround has been (temporarily) adding |
Setting |
@atugushev Maybe we could introduce an own That would simplify things. |
@chrysle
However, the main issue is figuring out how to pass the index URL properly to build.utils.project_wheel_metadata(). |
Wasn't there the golden rule that if StackOverflow doesn't know the answer, it's impossible? I think we should really set If you passed |
I have to use custom/private pypi index as our network setup blocks access to https://pypi.org. Passing
--pip-args="--index_url https://pypi.private.url"
(akapip -i
) is not applied whensetuptools
andwheel
are being installed. The issue is also visible with other args like--timeout 1
, etc...As this seems to be an issue out of scope of
pip-tools
I'm not sure it can be fixed/handled. I wanted to provide a writeup with observed behavior and workarounds I've tested for devs facing the same issues in future, because I've failed to find a simple answer/solution when searching through issues myself.Environment Versions
$ python -V
: Python 3.10.6$ pip --version
: pip 22.3.1$ pip-compile --version
: pip-compile, version 6.12.0Steps to replicate
venv
pip
, installpiptools
pyproject.toml
. nothing fancy, barebones setuppyproject.toml
:pip-compile --verbose pyproject.toml --resolver=backtracking --pip-args="-i https://pypi.private.url'
My findings so far
click
loads--pip-args
succcessfuly -> no issues with CLI parsingpip_args
is available untilpiptools\scripts\compile.py", line 483, metadata = project_wheel_metadata()
-i
is not passed to\build\util.py", line 53, project_wheel_metadata()
in any way and there is no interface to make it happen.build\env.py", line 211, in install; _subprocess(cmd)
executes without-i
and failsExpected result
Successful result obtained via Workaround
Actual result
subprocess
executespip
without-i
, tries to reachpypi.org
despite--pip-args="-i https://pypi.private.url"
and obviously fails.output + traceback:
Workarounds
Use
PIP_INDEX_URL
environment variableForce system global pip index in:
Win:
%HOME%/pip/pip.ini
nix:
$HOME/.config/pip/pip.conf
The text was updated successfully, but these errors were encountered: