I have dependency_links in my setup.py:
... dependency_links = ['http://github.com/robot-republic/python-s3/tarball/master.tar.gz#egg=python-s3'], ...
But it doesn't work. However install_requires works fine. Maybe there are another method to set up git repo as required for setup.py?
@joeforker, pip uses setup.py behind the scenes.
py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. I found a very detailed write-up explaining this issue: "Why you shouldn't invoke setup.py directly" (October 2021).
install_requires is a section within the setup.py file in which you need to input a list of the minimum dependencies needed for a project to run correctly on the target operating system (such as ubuntu). When pip runs setup.py, it will install all of the dependencies listed in install_requires.
This answer should help. In a nutshell, you need to specify the version (or "dev") for the #egg=python-s3
so it looks like #egg=python-s3-1.0.0
.
Updates based on @Cerin's comment:
--process-dependency-links
. I haven't tested it because I agree with the point below.since pip version 18.1 PEP 508 URL is supported. That means you don't need the deprecated dependency_links anymore. You write the dependency directly in the install_requires list instead. The example from @Chad looks like this:
setup( name='yourpackage', version='1.7.5', packages=[], url='', license='', author='', author_email='', description='', install_requires=[ 'somepackage==1.2.0', 'repo @ https://github.com/user/archive/master.zip#egg=repo-1.0.0', 'anotherpackage==4.2.1' ], )
To install your package you can simply write:
pip install yourpackage
(without --process-dependency-links)
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