社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Git

写入设置。py在install_中使用git repo需要检测已安装的

Betterthan Kwora • 4 年前 • 2057 次点击  

我有一个带有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"
    ],  
)

(我正在追踪最新的答案。) here 关于git回购依赖关系。)

但是,我想跳过安装 hello-world 如果它已经安装在我当前的环境中。然而,如果我跑 pip install -e . 两次,第二次仍将克隆 你好,世界 .相比之下,如果我刚刚 install_requires=[r"hello-world"] ,它会正确地检测到这个要求已经得到满足。

在我看来 git+ssh 无法很好地检测已经满足的需求。我认为 #egg=hello-world 会解决这个问题的。我错过什么了吗?

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/131215
文章 [ 1 ]  |  最新文章 4 年前