-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Hello, everyone! I don't know why not use index-url
defined in /etc/pip.conf
.
Currently, pipenv
use source.url
in Pipfile and a runtime option --pypi-mirror
to specify the pypi index page. In my mind, this is not a smart design.
First of all, why should any body write the url in their source code. If someone is working on an opensource project and he use his closest mirror site and write the url in the source code. Other people have to modify the url first to run his code. If he is an developer, his Pipfile
and Pipfile.lock
would be changed, should he include this change in the SCM? For his convenience, he should include this change. But when he open pull requests to upstream, it's hard to process.
Second, using --pypi-mirror
to specify mirror, which is really annoying. Developers from different place would have different command line. Imagine, every time they want to use pipenv
, they have to type the --pypi-mirror
option with a long url. It's really bad experience. What's more, developers usually have their /etc/pip.conf
configuration since they start to play with python, but they still have to type that long url already defined in /etc/pip.conf
. For some automation tool, they have to modify all command line relative with pipenv
add that annoying option.
As far as I'm concerened, the /etc/pip.conf
is the best design to specify the pypi mirror. Which is
- Non-intrusive: no need to hardcoded in source code, no need to type for every command
- Compatible with pip: painless for pip user to migrate
- Humanity: makes people happy using pipenv