Build numpy and scipy with openblas

Fixes #6772.
This commit is contained in:
Thomas Tuegel 2015-06-04 17:17:40 -05:00
parent e729a88474
commit bfe106cfa6
2 changed files with 10 additions and 10 deletions

View File

@ -3,14 +3,14 @@
python, python,
# Name of package (e.g. numpy or scipy) # Name of package (e.g. numpy or scipy)
pkgName, pkgName,
# Atlas math library # OpenBLAS math library
atlas openblas
}: }:
{ {
# Re-export atlas here so that it can be sure that the same one will be used # Re-export openblas here so that it can be sure that the same one will be used
# in the propagatedBuildInputs. # in the propagatedBuildInputs.
inherit atlas; inherit openblas;
# First "install" the package, then import what was installed, and call the # First "install" the package, then import what was installed, and call the
# .test() function, which will run the test suite. # .test() function, which will run the test suite.
@ -48,9 +48,9 @@
preBuild = '' preBuild = ''
echo "Creating site.cfg file..." echo "Creating site.cfg file..."
cat << EOF > site.cfg cat << EOF > site.cfg
[atlas] [openblas]
include_dirs = ${atlas}/include include_dirs = ${openblas}/include
library_dirs = ${atlas}/lib library_dirs = ${openblas}/lib
EOF EOF
''; '';
} }

View File

@ -7798,7 +7798,7 @@ let
numpy = let numpy = let
support = import ../development/python-modules/numpy-scipy-support.nix { support = import ../development/python-modules/numpy-scipy-support.nix {
inherit python; inherit python;
atlas = pkgs.atlasWithLapack; openblas = pkgs.openblasCompat;
pkgName = "numpy"; pkgName = "numpy";
}; };
in buildPythonPackage ( rec { in buildPythonPackage ( rec {
@ -7821,7 +7821,7 @@ let
setupPyBuildFlags = ["--fcompiler='gnu95'"]; setupPyBuildFlags = ["--fcompiler='gnu95'"];
buildInputs = [ pkgs.gfortran self.nose ]; buildInputs = [ pkgs.gfortran self.nose ];
propagatedBuildInputs = [ support.atlas ]; propagatedBuildInputs = [ support.openblas ];
meta = { meta = {
description = "Scientific tools for Python"; description = "Scientific tools for Python";
@ -11260,7 +11260,7 @@ let
scipy = let scipy = let
support = import ../development/python-modules/numpy-scipy-support.nix { support = import ../development/python-modules/numpy-scipy-support.nix {
inherit python; inherit python;
atlas = pkgs.atlasWithLapack; openblas = pkgs.openblasCompat;
pkgName = "numpy"; pkgName = "numpy";
}; };
in buildPythonPackage rec { in buildPythonPackage rec {