mis*_*ope 5 python git virtualenv pipenv
可以在Pipfile自定义Git存储库的包中指定.但是我找不到关于如何指定具体分支或用于安装的提交的综合文档.
是否有关于如何在指定自定义分支,版本或提交Pipfile所支持的python包中使用Git URL的完整参考pipenv?
使用等效的pipenv命令行参数非常好.
这是关于Pipenv的GitHub存储库上的一些文档:
您可以使用根据以下规则设置格式的URL从git和其他版本控制系统中使用pipenv安装软件包:
<vcs_type>+<scheme>://<location>/<user_or_organization>/<repository>@<branch_or_tag>#egg=<package_name>
Run Code Online (Sandbox Code Playgroud)
https://github.com/pypa/pipenv/blob/master/docs/basics.rst#-a-note-about-vcs-dependencies
因此,例如:
[packages]
requests = {git = "https://github.com/requests/requests.git", editable = true, ref = "v2.20.1"}
Run Code Online (Sandbox Code Playgroud)
您可以使用命令行生成Pipfile。上面的Pipfile是使用以下命令生成的:
pipenv install -e git+https://github.com/requests/requests.git@v2.20.1#egg=requests
Run Code Online (Sandbox Code Playgroud)
pip的文档在这里更详细