This question has been asked several times around the site, but the answer frequently seems to be an omission of the install_requires
arg.
Not the case here.
I'm trying to build a wheel that can be pip installed in a way that also installs a required package that's not on PyPI.
my setup.py
includes:
setup(
install_requires= ['shotgun-api3']
dependency_links = [
"git+https://github.com/shotgunsoftware/python-api.git@v3.0.36#egg=shotgun_api3"
],
# ...
)
From the commandline I then run python setup.py sdist bdist_wheel
to generate the /dist/mypackage-0.1.0-py2-none-any.whl
.
Rather than upload my package to an index, I'm trying to install my package from the filesystem; so in a clean virtualenv, I then run:
pip -v install mypackage --no-index --find-links file:///F:/RyDev/myproject/dist --process-dependency-links
.
And I get:
DistributionNotFound: No matching distribution found for shotgun-api3 (from mypackage)
and because I used the verbose flag, I see:
Collecting shotgun-api3 (from mypackage)
0 location(s) to search for versions of shotgun-api3:
Skipping link file:///F:/RyDev/mypackage/dist/mypackage-4.0.0-py2-none-any.whl; wrong project name (not shotgun-api3)
Skipping link file:///F:/RyDev/mypackage/dist/mypackage-4.0.0.tar.gz; wrong project name (not shotgun-api3)
It's maybe worth noting:
- if I remove the
install_requires
arg fromsetup.py
,mypackage
will pip install without errors...just without the dependency. - I can run
pip install git+https://github.com/shotgunsoftware/python-api.git@v3.0.36#egg=shotgun_api3
and it successfully installs the shotgun-api3 package.
...but for the life of me, I can't seem to get shotgun-api3
to install as a dependency for mypackage
.
It looks to me like the (git) URL I provided to dependency_links isn't being included in the list of locations, so I'm wondering if I'm missing something around that?
Environment:
- Python 2.7.13 (cannot upgrade)
- Windows 7 (cannot switch OS)
- pip 10.0.1
- setuptools 39.2.0
- virtualenv 16.0.0
- wheel 0.31.1