It is possible to specify in Pipfile
packages from custom Git repository.
But I cannot find a comprehensive documentation on how to specify the concrete branch or a commit to be used for installation.
Is there a complete reference on how to use Git URLs for python packages in the Pipfile
that are supported by the pipenv
for specifying custom branches, versions or commits?
It would be really nice to have it with equivalent pipenv
command line arguments.
The Pipfile. lock is intended to specify, based on the packages present in Pipfile, which specific version of those should be used, avoiding the risks of automatically upgrading packages that depend upon each other and breaking your project dependency tree.
pip will grow a new command line option, -p / --pipfile to install the versions as specified in a Pipfile , similar to its existing -r / --requirement argument for installing requirements. txt files. To manually update the Pipfile.
To activate the environment, just navigate to your project directory and use pipenv shell to launch a new shell session or use pipenv run <command> to run a command directly.
Here is some documentation on the GitHub repo for pipenv:
You can install packages with pipenv from git and other version control systems using URLs formatted according to the following rule:
<vcs_type>+<scheme>://<location>/<user_or_organization>/<repository>@<branch_or_tag>#egg=<package_name>
https://github.com/pypa/pipenv/blob/master/docs/basics.rst#-a-note-about-vcs-dependencies
so, for example:
[packages]
requests = {git = "https://github.com/requests/requests.git", editable = true, ref = "v2.20.1"}
You can generate a Pipfile using the command line. The Pipfile above was generated with:
pipenv install -e git+https://github.com/requests/[email protected]#egg=requests
The documentation for pip goes into more detail here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With