pipenv/pip 从 git commit/revision id 安装
pipenv/pip install from git commit/revision id
我想从 git 存储库安装一个包,使用 pipenv 指定提交 ID(我相信如果我使用 pip,它应该非常相似)
到目前为止我试过:
pipenv install "git+ssh://git@bitbucket.org/<username>/<repository>.git/<commit_id>#egg=mypackage"
将以下行附加到 Pipfile 并且未提供任何错误
<package-name> = {git = "ssh://git@bitbucket.org/<username>/<repository>.git/<commit_id>"}
如果我导入包 import mypackage
它会检测到它,但它的依赖项丢失了。
mypackage的setup.py长得像;
import setuptools
with open("README.md", "r") as readme:
long_description = readme.read()
with open("./requirements.txt", "r") as fh:
requirements = fh.readlines()
setuptools.setup(
name='mypackage',
url='https://bitbucket.org/<username>/<repositroy>',
packages=setuptools.find_packages(),
install_requires=[req for req in requirements if req[0] not in ["#", "-"]],
)
刚刚通过阅读 this 了解到应该在 @
之后指定修订 ID
pipenv install "git+ssh://git@bitbucket.org/<username>/<repository>.git@<commit_id>#egg=<package_name>"
我想从 git 存储库安装一个包,使用 pipenv 指定提交 ID(我相信如果我使用 pip,它应该非常相似)
到目前为止我试过:
pipenv install "git+ssh://git@bitbucket.org/<username>/<repository>.git/<commit_id>#egg=mypackage"
将以下行附加到 Pipfile 并且未提供任何错误
<package-name> = {git = "ssh://git@bitbucket.org/<username>/<repository>.git/<commit_id>"}
如果我导入包 import mypackage
它会检测到它,但它的依赖项丢失了。
mypackage的setup.py长得像;
import setuptools
with open("README.md", "r") as readme:
long_description = readme.read()
with open("./requirements.txt", "r") as fh:
requirements = fh.readlines()
setuptools.setup(
name='mypackage',
url='https://bitbucket.org/<username>/<repositroy>',
packages=setuptools.find_packages(),
install_requires=[req for req in requirements if req[0] not in ["#", "-"]],
)
刚刚通过阅读 this 了解到应该在 @
之后指定修订 IDpipenv install "git+ssh://git@bitbucket.org/<username>/<repository>.git@<commit_id>#egg=<package_name>"