python3Packages.pythran: use LLVM openmp when using clang

This fixes pythran (and, therefore, also scipy, etc.) under Darwin
builds, which use LLVM by default.
This commit is contained in:
Luke Granger-Brown 2021-09-11 02:33:29 +00:00
parent 6da8f60683
commit 222c5477e2
2 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,7 @@
, python
, buildPythonPackage
, fetchFromGitHub
, openmp
, pytest-runner
, ply
, networkx
@ -34,7 +35,7 @@ in buildPythonPackage rec {
# Hardcode path to mp library
(substituteAll {
src = ./0001-hardcode-path-to-libgomp.patch;
gomp = "${stdenv.cc.cc.lib}/lib/libgomp${stdenv.hostPlatform.extensions.sharedLibrary}";
gomp = "${if stdenv.cc.isClang then openmp else stdenv.cc.cc.lib}/lib/libgomp${stdenv.hostPlatform.extensions.sharedLibrary}";
})
];

View File

@ -7341,7 +7341,9 @@ in {
python-xmp-toolkit = callPackage ../development/python-modules/python-xmp-toolkit { };
pythran = callPackage ../development/python-modules/pythran { };
pythran = callPackage ../development/python-modules/pythran {
inherit (pkgs.llvmPackages) openmp;
};
pyeverlights = callPackage ../development/python-modules/pyeverlights { };