[Distutils] install_requires option to force pypi url or a better approach?

Aljoša Mohorović aljosa.mohorovic at gmail.com
Fri Dec 18 18:12:10 CET 2009


i've setup private pypi where i can upload some packages that are not
suitable for pypi.python.org.
my package, let's call it myapp, contains
"install_requires=['django',]" but with that requirement i can't
install it.

--------------------------------------------------
$ virtualenv --no-site-packages --distribute env
New python executable in env/bin/python
A globally installed setuptools was found (in /usr/lib/python2.6/dist-packages)
Use the --no-site-packages option to use distribute in the virtualenv.
Installing distribute...........................................................................................................................................................................done.
$ . env/bin/activate
$ pip freeze
distribute==0.6.8
wsgiref==0.1.2
$ pip install myapp -i http://pypi.example.com
Downloading/unpacking myapp
 Using download cache from /home/aljosa/.pip-cache/<MYAPP PKG URL>
 Running setup.py egg_info for package myapp
Downloading/unpacking django (from myapp)
 Could not find any downloads that satisfy the requirement django (from myapp)
No distributions at all found for django (from myapp)
--------------------------------------------------

since i can normally install django with "pip install django" i assume
that when i set "-i http://pypi.example.com" it's also used for
install_requires.
any tips on using multiple pypi repositories? is there some way to
define which pypi url to use for package installation?

Aljosa Mohorovic


More information about the Distutils-SIG mailing list