My project depends on lots of packages. Some are listed on pypi, some are not.
I now have a folder named "external-packages" where I keep .tar.gz files of the packages that I need that are not on pypi.
I want to alter setup.py so that when it reads the install_requires section and finds a package that is not yet installed, first, it should look in the "external-packages" folder, and then if that fails, then it should go search on pypi.
Is this possible? How to do this?
Thanks for the help.
It seems you use setuptools/distribute (indicated by install_requires
option). You could use dependency_links
setting in setup.py
but it limits your options to distribute your package. For example, you might use one set of dependencies for development, several sets for testing, yet another set for a debian package, etc.
Both easy_install
, pip install
provide --find-links
, --index
options that you could specify at the command-line, in config files. It allows to use the right set of requirements for each specific case without editing setup.py
.
You could also use requirements files to specify what versions should be installed and where to get them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With