-
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
Implement sysconfig-based location inference #9626
Conversation
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 |
755de34
to
9da8b15
Compare
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 |
Module-level logic is bad.
This also helps catch bugs in the logic, which are also fixed in this commit.
Okay, I think I’ve caught all the pip-specific edge cases. The only remaining failures are all PyPy. Its
and this is arguably exactly the kind of mismatches we want to catch and help implementations fix. Who should we reach out to discuss this with PyPy folks? |
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.
This is really great and looks good to me. The only thought I have is we should probably add more "proper unit tests" for the newly introduced sysconfig-related code, instead of only patching the existing ones.
But, eh.
/cc @mattip for help with PyPy's sysconfig vs distutils.sysconfig stuff. :) |
Thanks for pinging me. Please test the latest PyPy3.6 and 3.7, which is available on github actions via the As for |
The I checked PyPy’s implementation, it seems like the mismatch happens because our This also seems to surface another issue in |
Hmm. It seems there are a few problems. One is that PyPy never bothered to sync up distutils.command.install with the changes it made to sysconfig. Another is the difference in schemes, that it never backported to CPython. But +- bugs, there should be no need for pip to adjust If we want a single source for sysconfig across implementations, I think the best course would be to modify sysconfig's scheme layout and add a |
It seems that is a private interface, the public one is |
Yeah, this is all very emperical work, and on top of what the implementations do, the OS distributors do their thing too. Anyhow, thanks for pointing out the distutils install command, I have already made a stab at fixing that in PyPy. Could you point me to the tests that discovered the discrepancy? |
I mean, part of why I want distutils out of the standard library is this stuff, but I’m glad that @uranusjr filed this PR, because this has always felt like a field of thorns - it touches legacy defacto stuff + new stuff and alternate Python implementations. :) |
I’ve raised this in bpo-43312. |
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 |
@uranusjr Let's get this up to date, mark the tests as |
Let me try fixing PyPy instead. I’ll do the xfails if this does not work… |
78fcbeb
to
a51faf4
Compare
🔔 THIS WORKS 🔔 |
AHAHAHAHA. Let's do this! :) |
FWIW, I'm seeing that this fails with GitHub's https://github.com/pradyunsg/pip/pull/9/checks?check_run_id=2250267986#step:6:4862 |
I don't see any failures there. Could you copy-paste the failing test or otherwise point out what is failing on pypy3 ? |
https://github.com/pradyunsg/pip/runs/2250246469?check_suite_focus=true Whoops, I think what was the wrong tab's URL. Sorry! |
If I understand the log correctly, it seems there is a mismatch between distutils and sysconfig?
... and going over to issue #9617 I see you already reached the same conclusion :). I will continue there. |
This detects location differences between distutils and sysconfig, and tell users to comment in #9617.