-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an --intransitive option. #775
Conversation
If specified, only the explicitly provided requirements are resolved. Their transitive requirements are not. Since pex checks that all requirements are satisfied, this means that a complete transitive set must be provided explicitly in order to use this flag. This is useful if you have a lockfile from some other source and want pex to just apply it.
@@ -33,6 +33,9 @@ def __init__(self, filename): | |||
|
|||
# Process lines in the requirements.txt format as defined here: | |||
# https://pip.pypa.io/en/latest/reference/pip_install.html#requirements-file-format | |||
# Note that the lines can be not just pip-style requirement specifiers as detailed | |||
# at the link above, but any string representation of a Resolvable that pex understands, | |||
# including package URLs and setup.py directories. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your comment is true, so lgtm, but, as of today, Resolvable.get is still a strict subset. You can pip install an url pointing at a package as well as a local directory containing a setup.py.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. That isn't mentioned in that pip documentation though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sortof is. The archive url/path one is explicit. The local project path less so, since they only talk about the editable (prefix with -e) case. You can install a local project without -e and it just never updates after that if edited.
Each line of the requirements file indicates something to be installed, and like arguments to pip install, the following forms are supported:
[[--option]...]
<requirement specifier> [; markers] [[--option]...]
<archive url/path>
[-e] <local project path>
[-e] <vcs project url>
For details on requirement specifiers, see Requirement Specifiers.
If specified, only the explicitly provided requirements are
resolved. Their transitive requirements are not.
Since pex checks that all requirements are satisfied, this means
that a complete transitive set must be provided explicitly in
order to use this flag.
This is useful if you have a lockfile from some other source
and want pex to just apply it.
Addresses #772