在另一个包中提供Python包

时间:2017-06-07 11:03:43

标签: python pip packages

我有两个项目,其中一个是另一个的依赖项。因为它们是私有项目,所以它们不会发布到PyPI,可以通过pip正常下载,但可以根据需要出售到其他项目中。我的包裹布局如下:

project_a/
  ...
  setup.py

project_b/
  ...
  setup.py
  vendor/
    project_a-0.0.1-py3-none-any.whl

setup.py中的project_b文件引用project_a作为install_requires中的正常依赖关系:

setup(
    # ...
    install_requires=[
        'project_a',
    ],
    # ...
)

但是,当我在另一个项目中尝试pip install project_b时,无法解析project_a

Collecting project_a (from project_b==0.0.1)
  Could not find a version that satisfies the requirement project_a (from project_b==0.0.1) (from versions: )
No matching distribution found for project_a (from project_b==0.0.1)

我尝试做的是什么,或者在我的其他项目中分别是project_aproject_b供应商的正确方法?

0 个答案:

没有答案