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

Support --use-pep517 and --no-use-pep517 inside requirements files #6447

Closed

Conversation

cjerdonek
Copy link
Member

Fixes #6438.

Copy link
Member

@chrahunt chrahunt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to update the list of available options under the Requirements File Format to include the new ones.

Also using the original issue's requirements.txt verbatim results in no output:

$ echo "--no-use-pep517 docopt" > requirements.txt
$ pip install -r requirements.txt
$

Using docopt --no-use-pep517 instead works:

$ echo "docopt --no-use-pep517" > requirements.txt
$ pip install -r requirements.txt
Collecting docopt (from -r requirements.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/a2/55/8f8cab2afd404cf578136ef2cc5dfb50baa1761b68c9da1fb1e4eed343c9/docopt-0.6.2.tar.gz
Installing collected packages: docopt
  Running setup.py install for docopt ... done
Successfully installed docopt-0.6.2

I'm not sure how the former is being interpreted. As a global option?

@pytest.mark.parametrize('use_pep517, line, expected', [
# Test passing use_pep517=None.
(None, '-e git+https://url#egg=SomeProject', None),
(None, '--use-pep517 -e git+https://url#egg=SomeProject', True),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs have: <requirement specifier> [; markers] [[--option]...], we should test for the same.

@pytest.mark.parametrize('use_pep517, line, expected', [
# Test passing use_pep517=None.
(None, '-e git+https://url#egg=SomeProject', None),
(None, '--use-pep517 -e git+https://url#egg=SomeProject', True),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we test with a non-editable, non-vcs requirements specifier as mentioned in the original issue?

@BrownTruck
Copy link
Contributor

Hello!

I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the master branch into this pull request or rebase this pull request against master then it will be eligible for code review and hopefully merging!

@BrownTruck BrownTruck added the needs rebase or merge PR has conflicts with current master label Oct 31, 2019
@jayvdb
Copy link

jayvdb commented Nov 16, 2019

ping @cjerdonek ;-)

@@ -172,6 +174,10 @@ def process_line(
opts, _ = parser.parse_args(
shlex.split(options_str), defaults) # type: ignore

if opts.use_pep517 is not None:
Copy link

@jayvdb jayvdb Nov 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rebased this for my own needs, and I only needed to change this to if options and options.use_pep517 ... and replace opts with options on the following line.

@chrahunt
Copy link
Member

@jayvdb if you're willing to carry this forward please feel free to open a new PR!

@pradyunsg
Copy link
Member

I'm gonna go ahead and close this PR -- it has merge conflicts, there's an not-responded-to review on the PR and there's an open tracking issue where we can have a discussion even after this PR is closed.

@pradyunsg pradyunsg closed this Jan 7, 2020
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Feb 6, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: PEP 517 impact Affected by PEP 517 processing C: requirement file Using `requirements.txt` needs rebase or merge PR has conflicts with current master type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option --no-use-pep517 not supported in requirement files
6 participants