-
-
Couldn't load subscription status.
- Fork 1.3k
Description
I 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.7Why 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.