問題描述
Pip 從 github monorepo 中安裝 python 庫 (Pip install a python library from within a github monorepo)
我有一個monorepo github項目,其中有一個python庫repo/python‑tools
,我想做的是pip
將此庫安裝到另一個項目。
類似:
python ‑m pip install git+https://github.com/myorg/myrepo/python‑tools
這是一個私有存儲庫,該項目是使用 poetry
構建的。
參考解法
方法 1:
Try
python ‑m pip install 'git+https://github.com/myorg/myrepo.git#egg=python_tools&subdirectory=python‑tools'
See the docs at https://pip.pypa.io/en/stable/reference/pip_install/#vcs‑support