azu*_*kin 7 python pip setuptools
这是我的setup.py:
setup(
...
install_requires=['GEDThriftStubs'],
dependency_links=['git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs'],
...)
Run Code Online (Sandbox Code Playgroud)
然后我创建包:
python setup.py sdist
Run Code Online (Sandbox Code Playgroud)
然后我尝试安装它:
pip install file://path/package-0.0.1.tar.gz
在终端中获取此信息:
Downloading/unpacking GEDThriftStubs (from package==0.0.1)
Could not find any downloads that satisfy the requirement GEDThriftStubs (from package==0.0.1)
No distributions at all found for GEDThriftStubs (from package==0.0.1)
Run Code Online (Sandbox Code Playgroud)
在像这样的pip.log消息中:
Skipping link git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs; wrong project name (not gedthriftstubs)
Run Code Online (Sandbox Code Playgroud)
如果重要的话,我的项目中没有任何名称为"gedthriftstubs"的名称.
但这很好用:
pip install git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs
Run Code Online (Sandbox Code Playgroud)
尝试:
$ pip install --process-dependency-links file://path/package-0.0.1.tar.gz
Run Code Online (Sandbox Code Playgroud)
请注意,此标签已从pippip 1.6 中删除。有关更多信息,请参阅 pip.pypa.io 上的这篇文章。
在 pip 1.5 中,处理依赖关系链接已被弃用,并在 pip 1.6 中被完全删除。
还有关于 pip 和依赖链接的冗长讨论(问题#1519)
如果这不起作用,您可能还需要在链接上添加版本后缀,如下所示:
git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs-0.0.1
Run Code Online (Sandbox Code Playgroud)
其中setup.py中指定0.0.1的versionged-thrift-stubs
| 归档时间: |
|
| 查看次数: |
1192 次 |
| 最近记录: |