dependency_links flag ignored when package exists on PyPI
See original GitHub issueI am relying on pyswarm
for a package I am working on. PyPI’s latest version is 0.6, but I need 0.7, which is only on GitHub. My stripped-down setup function is below:
from setuptools import setup, find_packages
setup(
name='mypackage',
version='0.1',
packages=find_packages(exclude=('examples', 'docs')),
install_requires=['pyswarm>=0.7'],
dependency_links=[
"git+https://github.com/tisimst/pyswarm",
]
)
As shown here, the install fails with:
$ pip install mypackage
...
Could not find a version that satisfies the requirement pyswarm>=0.7 (from mypackage==0.1) (from versions: 0.5, 0.6)
No matching distribution found for pyswarm>=0.7 (from mypackage==0.1)
However, installing via pip
works perfectly fine, satisfying pyswarm>=0.7:
$ pip install git+https://github.com/tisimst/pyswarm
Collecting git+https://github.com/tisimst/pyswarm
Cloning https://github.com/tisimst/pyswarm to /tmp/pip-0k6viimo-build
Requirement already satisfied: numpy in /home/sean/opt/anaconda3/lib/python3.5/site-packages (from pyswarm==0.7)
Installing collected packages: pyswarm
Running setup.py install for pyswarm ... done
Successfully installed pyswarm-0.7
Why is dependency_links
being ignored when setup()
attempts to find pyswarm-0.7
? It appears that versions 0.5 and 0.6 are found on PyPI (and do not satisfy the requirements), but version 0.7 is not found via the GitHub link despite the fact that pip
installs from the same link just fine.
My current workaround is to run pip install git+https://github.com/tisimst/pyswarm
via subprocess.call()
before setup()
is called (thus satisfying the pyswarm>=0.7
requirement), but this should not be necessary.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:11
- Comments:17 (6 by maintainers)
Top GitHub Comments
It’s because your missing a version in your link, since you ask for
hbmqtt>0.9.0
, either use:or better tag your link version, e.g.:
@gijzelaerr, if I can remember, this flag didn’t help me.