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:
- App being written:
AppA
- App in github:
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/app_b.git@0.1.1#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/app_b.git@0.1.1: 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 withsetuptools
. The responsible for thesetup()
call issetuptools
package (setuptools or distribute project).Neither
setuptools
ordistribute
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:For more information take a look at http://peak.telecommunity.com/DevCenter/setuptools#dependencies-that-aren-t-in-pypi
From pip documentation -
Try replacing
git+https
withgit+git
.