Skip to content

pass important env variable for proxy support in pip - #1475

Open
Stefano Sinigardi (cenit) wants to merge 2 commits into
microsoft:mainfrom
cenit:dev/cenit/proxy
Open

pass important env variable for proxy support in pip#1475
Stefano Sinigardi (cenit) wants to merge 2 commits into
microsoft:mainfrom
cenit:dev/cenit/proxy

Conversation

@cenit

Copy link
Copy Markdown
Contributor

as per title

Comment thread src/vcpkg/base/system.process.cpp Outdated
@cenit Stefano Sinigardi (cenit) changed the title pass important env variables for proxy support in pip and cuda new releases pass important env variable for proxy support in pip Aug 12, 2024
@dg0yt

Copy link
Copy Markdown
Contributor

So we can fix online builds, but we still can't build offline when it comes to pip an friends.

@BillyONeal

Copy link
Copy Markdown
Member

Can you point to docs for these and/or what the customer expectation for them is? In general we should be trying to route this stuff through x-download although it's understandable we might be unable to do so for pip.

To be clear, my concern would be customers expecting these variables to control other vcpkg downloads unrelated to pip and they not doing so, for instance, if we select the WinHTTP backend.

@cenit

Copy link
Copy Markdown
Contributor Author

https://pip.pypa.io/en/stable/topics/https-certificates/

you mean something like this?
the problem is that unless you have the very very recent pip 24.2+ coupled with a recent python interpreter already installed (not the case for vcpkg python tooling), corporate proxies are not supported without these env variables defined. But if you have your variables defined and you expect to make them enable vcpkg python tooling, you are welcomed with an error since vcpkg masks most of the env variables

@BillyONeal

Copy link
Copy Markdown
Member

But if you have your variables defined and you expect to make them enable vcpkg python tooling, you are welcomed with an error since vcpkg masks most of the env variables

Would it make sense for folks in this situation to opt-in to it by using VCPKG_KEEP_ENV_VARS?

@cenit

Copy link
Copy Markdown
Contributor Author

is there any rule written anywhere to say what should pass always if defined and what not and the user has to opt-in?
this env variable is not modifying the build but just enabling tools to work in specific environments

@BillyONeal

Copy link
Copy Markdown
Member

is there any rule written anywhere to say what should pass always if defined and what not and the user has to opt-in? this env variable is not modifying the build but just enabling tools to work in specific environments

The problem is that it's enabling a pattern that we are kinda trying to intentionally prevent (downloading things without going through asset caching) and we are concerned that adding such workarounds to the tool condones the behavior.

@cenit

Copy link
Copy Markdown
Contributor Author

understood. I just reply with consistency with curl treatment (http_proxy and https_proxy env variables), but then I'll just leave the field and pip has to survive by itself 😄

@BillyONeal

Copy link
Copy Markdown
Member

I just reply with consistency with curl treatment (http_proxy and https_proxy env variables)

I think I missed something here. Are you saying that libcurl listens to those variables too and we should pass them to it as well? (That is, this would improve 'correct' calls of x-download as well as the 'problematic' calls from pip?)

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

Successfully merging this pull request may close these issues.

5 participants