-
Notifications
You must be signed in to change notification settings - Fork 3k
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
PEP 518 build dependency installs don't respect --cert command line option #5502
Comments
I'm guessing this problem is here: pip/src/pip/_internal/build_env.py Line 79 in 77f6ac6
(Which is to say that --cert nor --client-cert are checked for nor appended in this use case.) |
Indeed, session specific options are not being forwarded. |
This is still the case in 19.2.2 |
Still the case with 20.0.2. Is there a chance that this bug will be fixed ? It effectively prevents me using local PYPI repository with HTTPS due to that and I do not want to workaround this bug with ugly --trusted-host |
IIUC the fix to this issue should not be too technically involved—locate where the PEP 517 hook installs build dependencies, and pass the flags to them (likely via environment variables for better compatibility). The biggest problem would be to find someone interested enough in this to do the necessary code-tracing and patching, which is still significant but boring work. Feel free to give it a shot if you’re inclined to. |
Anyone that needs this behavior now should be able to work around it by specifying their cert path in the |
In order to work around pypa/pip#5502 fully, we extract a `PackageIndexConfiguration` class that handles arrangement of Pip command line flags and enviornment variables to effect the most hermetic means possible of conveying `--cert` and `--client-cert` to Pip and its subprocesses. Fixes pex-tool#1058
In order to work around pypa/pip#5502 fully, we extract a `PackageIndexConfiguration` class that handles arrangement of Pip command line flags and enviornment variables to effect the most hermetic means possible of conveying `--cert` and `--client-cert` to Pip and its subprocesses. Fixes #1058
This seems to reappear in Solution : |
This appears to have been inverted for build 23.1.2 (likely earlier): |
+1 |
--cert
command line flag is not used in sub processes
#11476
Hi all, I have a proposed PR to fix this: #13063. It's ready to land, but I'd like to have some real world testing before I press merge. I'd appreciate anyone with a real world scenario that hits this bug to test my changes. It'd be helpful in ensuring that A) it works, and B) it doesn't break in whatever weird enterprise TLS setups that exist in the wild. You can install pip from the PR branch using Thanks! |
Environment
Description
pip ignores provided --cert options on the command line when it makes an installation attempt on a library that has a pyproject.toml file, meaning PEP 518 build dependencies kick in.
(Note: Whether or not attrs has a valid toml file because there's no
[build-system]
section present is technically irrelevant, because the failure I'm reporting is related to how pip tries to pull what it derives, not what pip derives to pull.)Expected behavior
When pip attempts to install PEP 518 build dependencies, it should use any provided --cert or --client-cert option. I tested that it doesn't use --cert. I would guess it probably doesn't use the related --client-cert either.
How to Reproduce
pip download --no-binary :all: --index-url https://my-devpi-server/myindex/+simple/ --cert /etc/ssl/certs/ca-certificates.crt attrs
Output
(Note that my-index has root/pypi as an index parent, so that redirection would be expected.)
The text was updated successfully, but these errors were encountered: