-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
python: improve ABI name detection #210035
Conversation
cc @amjoseph-nixpkgs |
cc @pjjw |
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.
nice! thanks for doing a more complete sol'n.
Would it be also possible to backport this PR? I'd like to keep using stable for work, but I can't for the life of me figure out how to override the cross-compiled python, but not the native one. |
With the backport label added a new PR targeting stable will be automatically opened. |
Successfully created backport PR #211589 for |
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.
LGTM
This breaks in the case of musl on armv7l, because |
Seriously? Python calls all Linux platforms I mean given the state of the Python ecosystem I'm willing to believe this, but it just sounds so totally crazy that I wanted to double-check. Is there some documentation of this weirdness somewhere? |
The only "documentation" I know of is the configure script: https://github.com/python/cpython/blob/e488e300f5c01289c10906c2e53a8e43d6de32d8/configure.ac#L724 |
There is some discussion about it in this thread: python/cpython#87278 |
yeah, looks like the "real" fix is stuck here: python/cpython#96001 |
Description of changes
This makes
pkgsCross.ppc64.python3Packages.pip
work again.We somewhat recently changed the PPC64 arch to be
powerpc64-unknown-linux-gnuabielfv2
with this ABI name as a way to differentiate between the ELFv1 and ELFv1 variant of PowerPC64. Python doesn't support this ABI name (which is expected), so I went and changed the mapping between nixpkgs' ABI names and Python's ABI names.This basically use the ABI name as-is, if it is supported by Python, and will fallback to the "gnu" ABI if it is not supported.
This targets
master
as this shouldn't cause rebuilds for Tier 1, Tier 2, or Tier 3 architectures.Pinging @NixOS/exotic-platform-maintainers and @FRidh
Things done
python3Packages.pip
:pkgsCross.ppc64
pkgsCross.ppc64-musl
pkgsCross.raspberryPi
pkgsCross.aarch64-multiplatform
pkgsCross.gnu32
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)pip --version
works forgnu32
crossnixos/doc/manual/md-to-db.sh
to update generated release notes