-
-
Notifications
You must be signed in to change notification settings - Fork 15.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
python3: add C++ compiler support for distutils #39576
Conversation
96ae2dc
to
ea08d81
Compare
This implements 095095c ('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. |
@@ -39,6 +39,8 @@ let | |||
++ optionals x11Support [ tcl tk libX11 xproto ] | |||
++ optionals stdenv.isDarwin [ CF configd ]; | |||
|
|||
hasDistutilsCxxPatch = !(stdenv.cc.isGNU or false); |
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.
How about needsDistutilsCxxPatch
?
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.
@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 095095c ('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-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)