【发布时间】:2013-01-22 03:34:18
【问题描述】:
出于开发原因,我正在编写一个 python 应用程序,该应用程序依赖于托管在 github 存储库(从未在 pypi 中)上的另一个应用程序。
让我们给他们打电话:
- 正在编写的应用程序:
AppA - github 中的应用程序:
AppB
在 App A 中,setup.py 是这样的:
# 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'
]
)
现在AppA 正在由Jenkins CI 构建,每次推送我都会失败,因为抛出了下一个错误:
error: Download error for git+https://github.com/user/app_b.git@0.1.1: unknown url type: git+https
有趣的是,这只发生在 Jenkins 中,它在我的计算机上完美运行。我尝试了 github 提供的其他两个 SSH url,甚至都没有考虑下载。
现在,AppA 包含在同样由 Jenkins 构建的项目的需求文件中,因此不能通过 pip install AppA pip install AppB 手动安装依赖项,依赖项会通过包含在 @987654329 中自动安装@。
有没有办法让 pip 和 git 与 github url 一起工作?
任何帮助将不胜感激:)
提前致谢!
【问题讨论】:
-
你确定 Jenkins 使用 pip 吗?如果是,是否支持此功能的版本?
-
@Gerard 你的 Jenkins 盒子使用什么版本的 pip?
pip --version应该为您提供该信息。袖手旁观,看起来像0.8.2之前的版本,不支持https方案。
标签: python django git github pip