I'm writting a python app that depends on another one that is hosted on a github repository (never in pypi) for development reasons.
Lets call them:
AppA
AppB
In App A, the setup.py is like:
# coding=utf-8
import sys
try:
from setuptools import setup, find_packages
except ImportError:
import distribute_setup
distribute_setup.use_setuptools()
from setuptools import setup, find_packages
setup(
...
install_requires=[
# other requirements that install correctly
'app_b==0.1.1'
],
dependency_links=[
'git+https://github.com/user/[email protected]#egg=app_b-0.1.1'
]
)
Now AppA
is being built by Jenkins CI
with every push and I get a failure because of the next error is thrown:
error: Download error for git+https://github.com/user/[email protected]: unknown url type: git+https
Funny thing is that this only happens in Jenkins, it works perfectly on my computer. I tried both of the other SSH urls that github gives and those are not even considered for download.
Now, AppA is included in the requirements file of a project also being built by Jenkins, so installing the dependencies manually via pip install AppA
pip install AppB
is not an option, the dependencies are automatically installed by being included in the requirements.txt
.
Is there any way to make pip and git with github urls work together?
Any help will be very appreciated :)
Thanks in advance!
The problem is not with pip
, is with setuptools
. The responsible for the setup()
call is setuptools
package (setuptools or distribute project).
Neither setuptools
or distribute
understand that kind of url, they understand tarballs/zip files.
Try pointing to Github's download url - usually a zip file.
Your dependency_links
entry is probably going to look like:
dependency_links=[
'https://github.com/user/app_b/archive/0.1.1.zip#egg=app_b-0.1.1'
]
For more information take a look at http://peak.telecommunity.com/DevCenter/setuptools#dependencies-that-aren-t-in-pypi
From pip documentation -
pip currently supports cloning over git, git+http and git+ssh:
git+git://git.myproject.org/MyProject#egg=MyProject
git+http://git.myproject.org/MyProject#egg=MyProject
git+ssh://git.myproject.org/MyProject#egg=MyProject
Try replacing git+https
with git+git
.
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