python3: add C++ compiler support for distutils#39576
python3: add C++ compiler support for distutils#39576matthewbauer merged 1 commit intoNixOS:stagingfrom
Conversation
96ae2dc to
ea08d81
Compare
This implements 095095c4 ('python: add C++ compiler support for distutils')
for python3. Should fix various problems with python packages on darwin.
ea08d81 to
31010e0
Compare
|
Success on x86_64-linux (full log) Attempted: python3 Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Attempted: python3 Partial log (click to expand)
|
|
Success on aarch64-linux (full log) Attempted: python3 Partial log (click to expand)
|
|
Success on x86_64-linux (full log) Attempted: python3 Partial log (click to expand)
|
|
Failure on x86_64-darwin (full log) Attempted: python3 Partial log (click to expand)
|
|
Failure on x86_64-darwin (full log) Attempted: python3 Partial log (click to expand)
|
|
@FRidh: This would unbreak Cython on darwin. |
| ++ optionals x11Support [ tcl tk libX11 xproto ] | ||
| ++ optionals stdenv.isDarwin [ CF configd ]; | ||
|
|
||
| hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false); |
There was a problem hiding this comment.
How about needsDistutilsCxxPatch?
There was a problem hiding this comment.
@knedlsepp The meaning depends on the context. The point to have this attribute in the first place is to query python.hasDistutilsCxxPatch from numpy so that its numpy counterpart can be engaged (it won't work otherwise). But PR's are welcome if you still want to change it.
|
@FRidh Any concerns? |
|
After minor update 78e0521 the patch no longer applies (staging). |
|
I guess this is caused by python/cpython@10f715d |
This implements 095095c4 ('python: add C++ compiler support for distutils')
for python3. Should fix various problems with python packages on darwin.
Motivation for this change
Even in python3 the distutils will try to invoke C compiler to compile C++ files, which works against GCC and Apple Clang, but not with clang that we ship.
This expands on #27649 to play well with numpy/cython (see 46dd9df)
Fixes: #27649
Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)