diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-04-27 21:04:56 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-04-27 21:04:56 +0000 |
commit | a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e (patch) | |
tree | 47950e79183035018882419c4eff5047d1537b99 /nixpkgs/pkgs/development/python-modules/numpy/default.nix | |
parent | 5b00523fb58512232b819a301c4309f579c7f09c (diff) | |
parent | 22a3bf9fb9edad917fb6cd1066d58b5e426ee975 (diff) | |
download | nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.gz nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.bz2 nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.lz nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.xz nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.tar.zst nixlib-a4e6c7d26af697f4346cacb7ab18dcd7fcfc056e.zip |
Merge commit '22a3bf9fb9edad917fb6cd1066d58b5e426ee975'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/numpy/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/numpy/default.nix | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/numpy/default.nix b/nixpkgs/pkgs/development/python-modules/numpy/default.nix index 92bcb131ab19..949d5e5898b3 100644 --- a/nixpkgs/pkgs/development/python-modules/numpy/default.nix +++ b/nixpkgs/pkgs/development/python-modules/numpy/default.nix @@ -5,21 +5,23 @@ , gfortran , pytest , blas +, lapack , writeTextFile , isPyPy , cython , setuptoolsBuildHook }: +assert (!blas.is64bit) && (!lapack.is64bit); + let - blasImplementation = lib.nameFromURL blas.name "-"; cfg = writeTextFile { name = "site.cfg"; text = (lib.generators.toINI {} { - ${blasImplementation} = { - include_dirs = "${blas}/include"; - library_dirs = "${blas}/lib"; - } // lib.optionalAttrs (blasImplementation == "mkl") { + ${blas.implementation} = { + include_dirs = "${blas}/include:${lapack}/include"; + library_dirs = "${blas}/lib:${lapack}/lib"; + } // lib.optionalAttrs (blas.implementation == "mkl") { mkl_libs = "mkl_rt"; lapack_libs = ""; }; @@ -37,7 +39,7 @@ in buildPythonPackage rec { }; nativeBuildInputs = [ gfortran pytest cython setuptoolsBuildHook ]; - buildInputs = [ blas ]; + buildInputs = [ blas lapack ]; patches = lib.optionals python.hasDistutilsCxxPatch [ # We patch cpython/distutils to fix https://bugs.python.org/issue1222585 @@ -68,8 +70,10 @@ in buildPythonPackage rec { ''; passthru = { - blas = blas; - inherit blasImplementation cfg; + # just for backwards compatibility + blas = blas.provider; + blasImplementation = blas.implementation; + inherit cfg; }; # Disable test @@ -78,7 +82,7 @@ in buildPythonPackage rec { meta = { description = "Scientific tools for Python"; - homepage = https://numpy.org/; + homepage = "https://numpy.org/"; maintainers = with lib.maintainers; [ fridh ]; }; } |