forked from pypa/pipenv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stop using requirementslib models (pypa#5793)
* Move away from requirementslib models * Revise test since PEP-440 does not support wildcard versions but does support equivalent compatible release specifiers. * simplify and remove dead code * Ensure the os_name marker is AND with the other markers. * Move what we still need from requirementslib into the pipenv utils and stop vendoring it. * Remove requirementslib. * force upgrade of virtualenv for python 3.12 * remove virtualenv-clone * Update vcs specifiers documentation; infer name from specific pip line formats where possible. * Provide helpful text and error for recently removed commands * Set the right log levels and verbosity to show users the errors generated by pip resolver when supplying -v flag * Fix the collection of all matching package hashes for non-pypi indexes. Plus lesson from testing torch which contains local identifiers.
- Loading branch information
Showing
78 changed files
with
3,609 additions
and
10,321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,30 +103,54 @@ All sub-dependencies will get added to the `Pipfile.lock` as well. Sub-dependenc | |
|
||
## VCS Dependencies | ||
|
||
VCS dependencies from git and other version control systems using URLs formatted according to the following rule: | ||
VCS dependencies from git and other version control systems using URLs formatted using preferred pip line formats: | ||
|
||
<vcs_type>+<scheme>://<location>/<user_or_organization>/<repository>@<branch_or_tag>#egg=<package_name> | ||
<vcs_type>+<scheme>://<location>/<user_or_organization>/<repository>@<branch_or_tag> | ||
|
||
The only optional section is the `@<branch_or_tag>` section. When using git over SSH, you may use the shorthand vcs and scheme alias `git+git@<location>:<user_or_organization>/<repository>@<branch_or_tag>#egg=<package_name>`. Note that this is translated to `git+ssh://git@<location>` when parsed. | ||
Extras may be specified using the following format when issuing install command: | ||
|
||
<package_name><possible_extras>@ <vcs_type>+<scheme>://<location>/<user_or_organization>/<repository>@<branch_or_tag> | ||
|
||
Note: that the #egg fragments should only be used for legacy pip lines which are still required in editable requirements. | ||
|
||
$ pipenv install -e git+https://github.com/requests/[email protected]#egg=requests | ||
|
||
Note that it is **strongly recommended** that you install any version-controlled dependencies in editable mode, using `pipenv install -e`, in order to ensure that dependency resolution can be performed with an up-to-date copy of the repository each time it is performed, and that it includes all known dependencies. | ||
|
||
Below is an example usage which installs the git repository located at `https://github.com/requests/requests.git` from tag `v2.20.1` as package name `requests`: | ||
|
||
$ pipenv install -e git+https://github.com/requests/[email protected]#egg=requests | ||
Creating a Pipfile for this project... | ||
Installing -e git+https://github.com/requests/[email protected]#egg=requests... | ||
[...snipped...] | ||
Adding -e git+https://github.com/requests/[email protected]#egg=requests to Pipfile's [packages]... | ||
[...] | ||
Resolving -e git+https://github.com/requests/[email protected]#egg=requests... | ||
Added requests to Pipfile's [packages] ... | ||
Installation Succeeded | ||
Pipfile.lock not found, creating... | ||
Locking [packages] dependencies... | ||
Building requirements... | ||
Resolving dependencies... | ||
Success! | ||
Locking [dev-packages] dependencies... | ||
Updated Pipfile.lock (389441cc656bb774aaa28c7e53a35137aace7499ca01668765d528fa79f8acc8)! | ||
Installing dependencies from Pipfile.lock (f8acc8)... | ||
To activate this project's virtualenv, run pipenv shell. | ||
Alternatively, run a command inside the virtualenv with pipenv run. | ||
|
||
$ cat Pipfile | ||
[packages] | ||
requests = {git = "https://github.com/requests/requests.git", editable = true, ref = "v2.20.1"} | ||
requests = {editable = true, ref = "v2.20.1", git = "git+https://github.com/requests/requests.git"} | ||
|
||
$ cat Pipfile.lock | ||
... | ||
"requests": { | ||
"editable": true, | ||
"git": "git+https://github.com/requests/requests.git", | ||
"markers": "python_version >= '3.7'", | ||
"ref": "6cfbe1aedd56f8c2f9ff8b968efe65b22669795b" | ||
}, | ||
... | ||
|
||
Valid values for `<vcs_type>` include `git`, `bzr`, `svn`, and `hg`. Valid values for `<scheme>` include `http`, `https`, `ssh`, and `file`. In specific cases you also have access to other schemes: `svn` may be combined with `svn` as a scheme, and `bzr` can be combined with `sftp` and `lp`. | ||
|
||
You can read more about pip's implementation of VCS support `here <https://pip.pypa.io/en/stable/reference/pip_install/#vcs-support>`__. For more information about other options available when specifying VCS dependencies, please check the `Pipfile spec <https://github.com/pypa/pipfile>`_. | ||
You can read more about pip's implementation of VCS support `here <https://pip.pypa.io/en/stable/reference/pip_install/#vcs-support>`__. | ||
|
||
|
||
## Specifying Package Categories | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Drop requirementslib for managing pip lines and InstallRequirements, bring remaining requirementslib functionality into pipenv. | ||
Fixes numerous reports about extras installs with vcs and file installs; format pip lines correctly to not generate deprecation warnings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.