-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Pip 19.1 pip install --no-use-pep517 not working with nested requirements files #6433
Comments
So I get now pip is PEP compliant, but this now breaks peoples workflow without any sane workaround, I consider it as a PEP oversight. PEP-517/8 on purpose did not want to cover editable installs, considering something to be addressed down the line. As such I would argue PEP-517/PEP-518 no longer applies when editable install mode is enabled. It's the build frontend dependent on how this case is handled for now. In such a case, pip should fallback to the old system, until we define editable installs inside a PEP. @pfmoore want to weigh in? If we want people to explicitly require the old behaviour that's okay, but then --no-use-pep517 should work independently if the pyproject.toml is there or what it contains. |
What does the "..." say? What is it trying to install at that point? |
Asking people to type the obscure Of course, there's still |
Is the underscore in
|
Also, your command invocation doesn't seem to match up with the project setup you listed because |
Sorry, I removed the paths for brevity. Here's the full output:
|
Sorry, we do nest requirements. I simplified this but the full hierarchy is:
|
@tom-dalton-fanduel Have you tried adding the option inside the appropriate requirements file, instead of only at the root command? @pitrou That's a fair point re: the name. I'm guessing the expectation was that the option would only have to be used infrequently. The only "user-friendly" name that PEP 517 provides for the new behavior is |
I had great hopes but it failed spectacularly!
|
Right, I wouldn't mind having to add a new option (though I'm not sure why |
@tom-dalton-fanduel : I seem to recall something about only certain pip options being allowed inside requirement files. Some where disallowed for security-related reasons. In any case |
I agree with @pitrou, given that PEP 517 does not define editable installs, asking for one should imply not using PEP 517. |
Apologies for the confusion my failed attempts to simplify the problem. We do have a short term workaround in that we can just force-downgrade pip to 19.0.3. If we can't find a good workaround (or the intended workaround does not work in my case), I'd be keen to understand how we can effectively replicate our current setup.py-for-package and requirements-files-for-testing system using the new pyproject.toml file. It sounds like others are in the same boat so clear guidelines on best (or even good) practice for this would be helpful. At the moment I haven't been able to find a doc/blog/anything that explains what the migration path should/could be. |
created #6434 to differentiate between no backends section (this issue) and develop mode with a project that has requires+build-backend. |
Which will cause problems, when a later PEP specifies how editable installs work with pep517/8. But maybe the later "editable install" should then be called something different, like "source-install", "develope-install" or "repo-install" and not use the |
@pitrou The issue (as @con-f-use also stated above) isn't purity but rather that |
Unless, as I said, you define |
Regarding #6433 (comment), I filed #6438 which seems like a legitimate issue. |
By the way, here is a (somewhat) minimal example:
Output:
|
I think this is a reasonable thing to do. I like PEP 517 and (especially) PEP 518, but I have always figured the editable use case, which is completely undefined in either, was outside their scopes. The assertion of @cjerdonek "that pyproject.toml was meant to be the switch to turn on standards-defined behavior" sounds like you guys are interpreting the mere presence of this file as a purity switch. I think people want the features that the standards provides without sacrificing useful legacy behaviro. Continuing to support |
I'm complaining but the more I read on this, the more I'm understanding why you want to get away from this. For the record, a work around for this issue seems to be using the |
@tom-dalton-fanduel A couple hours ago I posted #6447 to permit using I think putting |
Yes this sounds like it would work for our use case. Is there a way I can test this that wouldn't require building that dev version of pip locally? E.g. Longer term it seems like we may want to actually start using PEP 517 functionality, is there any documentation on what the [future] best practice for our sort of setup will/should look like? At the moment we have package requirements specified in |
@tom-dalton-fanduel You can test the #6447 with |
I believe this should also work:
|
I personally like the idea of saying |
I tried the new version and it still failed... but then I realised I forgot to add the new option to my _base requirements. I added it, and:
🎉 |
This is no longer an issue with pip 19.1.1 due to #6434 - editible instlals with a pyproject.toml file are working again. Thanks to everyone involved :) |
Relevent issues:
#6375
#6314
#6370
Environment
Description
pip install
fails with a requirements file that references a setup.py file, in a project that has a pyproject.toml file that has no build tooling section.My project setup:
This setup allows us to:
pip install -r requirements/testing.txt
to install both the project requirements along with other stuff needed to run the tests.python setup.py sdist
The suggested workaround in #6370 (comment) doesn't seem to work for me:
pip install -r requirements/testing.txt
failsExpected behavior
Historically (in <= 19.0.3) pip would install the project and testing/dev requirements (into the current virtualenv).
How to Reproduce
Set up a project as per above, try to install the dev/testing requirements with
pip install -r foo.txt
.Output
As per description.
The text was updated successfully, but these errors were encountered: