Comments (6)
Thank you for confirming that it works! I'll add a note about PIP_*
variables to README.
I think multiple values could be supplied via one environment variable, space separated: PIP_EXTRA_INDEX_URL="https://url1 https://url2"
. I have not tested that though, and official docs are unfortunately lacking in that regard. If you can test that please leave a comment here.
from makefile.venv.
You're correct that there is no such functionality in Makefile.venv and your changes look like they'd work. But I'm not sure we should add this feature to our tool.
Is there some reason you don't want to provide --extra-index-url
within your requirements.txt or via PIP_EXTRA_INDEX_URL
environment variable? I think that would feel more natural to most Python developers.
There is nothing inherently wrong with the approach you suggested, but I think it would encourage people to create flakier workflows that require others to relearn how familiar things are done for no good reason.
from makefile.venv.
Is there some reason you don't want to provide --extra-index-url within your requirements.txt or via PIP_EXTRA_INDEX_URL environment variable? I think that would feel more natural to most Python developers.
I cannot add the URL to the requirements.txt
file since the URL contains the authentication token and the requirements file is managed with git. I wasn't aware of PIP_EXTRA_INDEX_URL
, though, thanks for the pointer (I'm not sure whether everyone is familiar with this environment variable since pip
's documentation is rather obscure on this regard).
There is nothing inherently wrong with the approach you suggested, but I think it would encourage people to create flakier workflows that require others to relearn how familiar things are done for no good reason.
How could it become flakier and unfamiliar? It is following the same pattern as REQUIREMENTS_TXT
.
from makefile.venv.
By flakiness I meant that it would be another intermediate step that would do nothing but could potentially break something, however unlikely.
As for the familiarity, I do not consider my tool as essential to Python developers as pip. Therefore I estimate there are a lot more people familiar with pip than there are those familiar with Makefile.venv. It would be impolite to burden the majority of potential users with learning documentation for a feature that does nothing but obfuscates PIP_EXTRA_INDEX_URL
into a different variable.
Could you test if PIP_EXTRA_INDEX_URL
works for you? I'm not at my computer right now.
If it works I think there is no need to modify Makefile.venv. We should probably add a hint to README to compensate for pip documentation (hopefully temporary) deficiency.
from makefile.venv.
I see, thanks for clarifying.
I'll give the environment variable a try and let you know (later as I'm AFK at the moment). If it does, a hint in the README is a good idea 👍
from makefile.venv.
Just tried the environment variable, it works fine. Thank you 👍
(While in my use case it is fine as I only need one extra-index URL, it seems the environment variable does not support specifying multiple URLs (according to this article, haven't tried it myself)).
from makefile.venv.
Related Issues (19)
- Sha256sum not working on MacOS HOT 6
- Expose the VENV to child processes HOT 4
- control over pip version HOT 4
- Trying to install the local project isn't necessarily desired HOT 7
- Python Launcher for Windows HOT 11
- Execute CI in bare Windows environment HOT 2
- CI failure on Windows 10 / Python 3.9.10 HOT 3
- $(RM) HOT 1
- Support for cygwin (with proposed solution) HOT 6
- Using `venv` as a proper dependency HOT 3
- pyproject.toml HOT 3
- Source .env for interactive shell targets HOT 2
- Install pyproject.toml optional dependencies HOT 2
- Execute CI tests in Cygwin HOT 1
- Spaces in path fatally confuse the script HOT 5
- Error when overriding the VENVDIR HOT 9
- support generated requirements .txt files HOT 4
- Write docs for pipenv/poetry integration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from makefile.venv.