【发布时间】:2013-03-02 18:33:16
【问题描述】:
这是我的 setup.py:
setup(
...
install_requires=['GEDThriftStubs'],
dependency_links=['git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs'],
...)
然后我创建包:
python setup.py sdist
然后我尝试安装它:
pip 安装文件://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)
在 pip.log 消息中是这样的:
Skipping link git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs; wrong project name (not gedthriftstubs)
如果重要的话,我的项目中没有确切的名称“gedthriftstubs”。
但这很好用:
pip install git+ssh://user@git.server.com/ged-thrift-stubs.git#egg=GEDThriftStubs
【问题讨论】:
-
啊,对不起,我错了。
-
您是在尝试
sudo python setup.py sdist还是只是python setup.py sdist? -
我在一个用户下和一个 virtualenv 内运行这两个命令,而没有 sudo。
标签: python pip setuptools