Skip to content
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

Merged
merged 3 commits into from
Oct 17, 2019
Merged

Add an --intransitive option. #775

merged 3 commits into from
Oct 17, 2019

Conversation

benjyw
Copy link
Collaborator

@benjyw benjyw commented Oct 17, 2019

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

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.
pex/bin/pex.py Outdated Show resolved Hide resolved
@@ -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.
Copy link
Member

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.

Copy link
Collaborator Author

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.

Copy link
Member

@jsirois jsirois Oct 17, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants