【发布时间】:2021-10-26 17:46:33
【问题描述】:
我有一个带有 git+ssh 依赖的包,像这样:
setup(
name="setuprequires",
version="0.1",
packages=["setuprequires"],
install_requires=[
r"hello-world @ git+ssh://git@github.com/hello/hello-world.git#egg=hello-world"
],
)
(我正在关注关于 git repo 依赖项的最新答案 here。)
但是,如果hello-world 已经安装在我当前的环境中,我想跳过安装它。然而,如果我运行pip install -e . 两次,第二次仍然会克隆hello-world。相反,如果我刚刚使用install_requires=[r"hello-world"],它会正确地检测到这个要求已经得到满足。
在我看来git+ssh 不能很好地检测已经满足的需求。我认为拥有#egg=hello-world 可以解决这个问题。我错过了什么吗?
【问题讨论】:
标签: python git setuptools setup.py