The dependencies of A Python package are declared in a file called setup.py
, under the key
install_requires
, e.g.:
install_requires=[
'Flask >= 0.10.1',
'requests >= 2.2.1',
'jsonschema >= 2.3.0',
'nose >= 1.3.0',
'behave >= 1.2.4'
]
The dependencies for tests are declared under the key tests_requires
.
When the package is installed (by using python setup.py install
), the dependencies are fetched from The Python Package index (pypi.python.org).
Is there a way to install the package, and let it fetch its dependencies from a local package repository, like pypiserver?
This way I can cache frequently-used packages, and install internal packages that do not exist in PyPi.
I am probably looking for something like:
python setup.py install
--repo http://127.0.0.1:8000/localrepo
--fallback-repo http://pypi.python.org