-
Notifications
You must be signed in to change notification settings - Fork 54
No way of passing pip arguments when creating an environment #2
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
Comments
To be clear, the package is split into lower-level infrastructure (mainly Playing semi devil's advocate*: According to pip's docs, command line options override environment variables. So passing through a command line argument would have the same effect as replacing an environment variable the user has set. That being the case, maybe environment variables are the right way to control this? (* i.e. I recognise this is an odd approach, and there may well be other drawbacks, but right now I don't have a good counterargument, so maybe it's worth exploring) |
Thanks. I wondered about that, the The whole suite of pip options around index access are pretty complex and messy, and people use them in quite weird and wonderful ways. Short term, I suspect environment variables is the sensible approach, longer term the whole area probably needs a tidy-up. |
👍 |
Alrighty. I'm here, and if there's anything I've been doing for the past 3 years, it's been tidy-up (sort of). :P Looking at pip + pep517, it looks like that it'd be a good idea to bring in pip's code for PEP 517 isolation and friends, into pep517. Synchronizing how pip / pep517 handle build isolation would make pip simpler (it can then switch to |
That sounds good. My one reservation is: can we bring the build environment machinery across without pep517 needing to know too much about pip's options (and thus potentially needing to change as pip changes)? I don't see a way around needing to use pip to find and install build dependencies, but if it's a dependency of pip, it seems like bad design if it needs to be tied to lots of details of pip. |
In the same way, that |
We've come to an agreement that the functionality to create isolated build environments and install build dependencies will live in the PyPA build project. The So I'm closing this, as there won't be any further significant work here on build environments & dependency installation. |
When creating an environment, pip is invoked to install the build requirements. But there is no way of passing custom arguments for pip, to control how packages are downloaded (for example
--extra-index-url
,--find-links
,--proxy
,--no-index
,--cert
,--trusted-host
, ...) Technically it would be possible to set the equivalent environment variables (PIP_*
) but that runs the risk of overriding any environment variables the user might have set (which may be a good thing or a bad thing, it's not immediately clear).My original need for this was to set
--find-links
when writing tests, to load a dummy backend from the test directory, but the general problem will need to be addressed if the library is to be used by pip, to copy over the options passed to pip.This probably needs some discussion - it's not obvious what the best way of handling this would be, and pip has rather a lot of options that are potentially relevant here. It's possible that the best solution would require changes to pip, as well.
The text was updated successfully, but these errors were encountered: