我有两个项目,其中一个是另一个的依赖项。因为它们是私有项目,所以它们不会发布到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_a
和project_b
供应商的正确方法?