-
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
Fix PEP 517 builds for packages without setup.py #6606
Conversation
c401dd0
to
1966934
Compare
I haven't looked at this in any detail (and I'm not likely to have the time to in the next few weeks) but at a minimum, this needs tests. |
I cloned this version of pip and installed it, and it enabled me to install |
I would appreciate help with this since I feel like this goes way beyond my knowledge. So if anybody would like to give me a proper code review, that would be great. |
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 |
Hi, could somebody please review this? |
BTW: There is now a functional test that would fail on |
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.
Thanks for this PR @seppeljordan (and your patience)!
I think we should be handling the wheel building earlier, so that such InstallRequirement objects flow through WheelBuilder
for getting built into wheels; instead of waiting until install to build the wheel.
This is because we should have the "build a PEP 517 wheel" logic in only one location within the codebase (currently that's WheelBuilder._build_one_pep517
) and the logic that you've provided is similar but not the same as that method, which makes the codebase difficult to mentally model.
If you're still interested in taking this forward, I would suggest that you investigate why these InstallRequirement objects are not being added to pep517_requirements
in commands/install.py:InstallCommand.run
. Once that understanding is built, we can then change code in a much more targeted manner, so that these do get added to pep517_requirements
, and processed like a PEP 517 requirement.
Thank you for the review, I will investigate and report back (hopefully with a patch). |
Awesome! Thank you! |
a04dd3c
to
d0f6cf7
Compare
Hey, so I looked into the matter and it seems like
It looks to me like this is where we decide how to process which requirement type. But if I modify the section like so:
we get an error. One would think that it is save to call this method here, since it is the last opportunity to do so before the path splits, but in fact you get an error: Command executed:
Don't mind the debug output in between. The point is that we cannot execute Any ideas or thoughts on the subject? @pradyunsg Could you provide contact to people who might know about this so I can ask them? |
That... would be me. :) So, that method should get called in Could you look into why (this is off-the-top-of-my-head, so let me know if this isn't clear) |
d0f6cf7
to
f44da3b
Compare
Okay. I made some progress. You are right in that
So the proposed fix is that instead of disabling binaries for all packages when Please let me know if you think that this is a reasonable solution. |
f44da3b
to
e9ea396
Compare
12ca306
to
58eb90f
Compare
Hi, I wrote a functional test. This test resides currently in The test itself runs |
24d0fe0
to
483daab
Compare
This whole process is kind of frustrating. I get it, you all have a lot of stuff to do... On the other hand, isn't it kind of embarrassing to have a package manager that can not install from source? I saw that even the release process is effected by this issue. If this PR was not taken care of during october I will close this it since it causes real frustration every time I see it in my PR overview. |
Hi @seppeljordan. Thank you for following up! I think that's the best way to get more eyes on this, and I'm sorry it wasn't more clear from our developer docs. I've created #7185 to help us tackle that gap in our processes. |
Thank you @pradyunsg @chrahunt |
@seppeljordan Really sorry that this got frustrating for you. I failed to state this as clearly earlier: I'm grateful that you took the time to file this PR initially, explore how to fix this, consider my request to rethink the fix, took the time to explore the test suite and write tests, and overall made an excellent PR experience for me as a maintainer of this project. Thank you! I've provided some additional context from my perspective below (I would've liked to polish up the following words more, but I have an assignment to submit in an hour, because I'm still in college). The lack of a response in this PR wasn't due to a lack of interest (not from me) but rather the lack of maintainer/developer time on pip. I'm one of the (two or three?) maintainers who are familiar enough with this part of pip, to be fairly sure of what a fix for this issue looks like. As @chrahunt pointed out, follow ups are likely the best way to get more eyes on a PR, especially mine -- that's how I'd noticed your PR on Sept 13 and taken time to review it on Sept 14. A bit more context on my personal situation -- I reviewed ~80 PRs in all of Sept, which included this one; and that's when I'd set a goal to reduce the ratio of time I spend reviewing PRs, to make time for some refactoring work. There are ~950 GitHub unread notifications sitting in my Octobox instance right now, and pinging on a PR moves it higher in that queue, which makes it more likely that I actually review the PR. :) Finally, I suggest anyone who's made excellent OSS contributions but gotten frustrated during the process, to take a look at https://snarky.ca/setting-expectations-for-open-source-participation/. If you know about it already, that's great! If not, please do take a look. I do understand that this has been a frustrating experience. That said, if you'd be willing, I'd really appreciate it if you continue to contribute to pip. The amount of effort that you've put into understanding the codebase and communicating is great to see. :) |
The idea of this patch is that we build a wheel and install that whell when we install a requirement from
source that does not support setup.py.
Fixes #6222.
I really want to see this happen, so please provide feedback in case you find any problems or possible improvements with this PR.