python3Packages.setuptools: add distutils patch to support cross-compilation#173435
python3Packages.setuptools: add distutils patch to support cross-compilation#173435Artturin merged 1 commit intoNixOS:stagingfrom
Conversation
c2a83f0 to
97bdb02
Compare
97bdb02 to
536143a
Compare
|
I'm running into a strange issue (not obviously related to this PR) where packages that depend on |
|
That ffi issue is an issue I observed before already, so I'd say it's unrelated. |
|
Yes, I bisected it and found that #169475 was responsible. |
536143a to
3b01096
Compare
|
@ofborg build pkgsCross.armv7l-hf-multiplatform.python3Packages.numpy |
| ./tag-date.patch | ||
| ./setuptools-distutils-C++.patch | ||
| # Use sysconfigdata to find headers. Fixes cross-compilation of extension modules. | ||
| (fetchpatch { |
There was a problem hiding this comment.
Is fetchpatch allowed here? Think this is somewhere in the bootstrap, hence causing the eval failure?
There was a problem hiding this comment.
I was wondering about that as well. I'm not sure how to know whether that is the case.
There was a problem hiding this comment.
The Python interpreter is a bootstrap package, but setuptools is not (and should not be).
|
The eval failure is unrelated and is due to ofborg timing out building something |
…ilation This is mostly the same patch applied to stdlib distutils, except rebased and reworked a bit. This fixes cross-compilation of Python packages with C extension modules now that setuptools uses bundled distutils.
3b01096 to
2294dac
Compare
|
@lopsided98 I had the same problem in nixos-22.05, do you want to backport this PR or should I open a new PR? |
|
cross-compilation is usually in the best shape on master so I recommend using nixos-unstable (afaik all of the people interested in cross-compilation are on nixos-unstable) you can add labels yourself if you want since you're a member of the org |
|
I want to migrate from NixOS-21.11 to NixOS-22.05 but I hit this issue. It is frustrating if we loose capabilities between NixOS releases. I try to find a workaround on my production side. We will see if more people are interested to fix this issue for NixOS-22.05. |
|
We can backport this, but it depends on what you're doing if this is sufficient |
|
Successfully created backport PR #181734 for |
|
Thanks. Yes this PR is sufficient to cross compile a lot of Python packages (e.g. lxml, btrfs-progs, ...) for NixOS-22.05. |
This fixes, again, the issue with the wrong headers being used when cross compiling python packages with extensions. For context, see NixOS#173435.
Description of changes
This is mostly the same patch applied to stdlib distutils, except rebased and reworked a bit. This fixes cross-compilation of Python packages with C extension modules now that setuptools uses bundled distutils. I will make another try at getting this patch upstreamed.
Fixes #168861.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes