1{lib, python, buildPythonPackage, isPyPy, gfortran, nose}: 2 3args: 4 5let 6 inherit (args) version; 7 inherit (args) numpy; 8in buildPythonPackage (args // rec { 9 10 name = "scipy-${version}"; 11 12 buildInputs = (args.buildInputs or [ gfortran nose ]); 13 propagatedBuildInputs = (args.propagatedBuildInputs or [ passthru.blas numpy]); 14 15 # Remove tests because of broken wrapper 16 prePatch = '' 17 rm scipy/linalg/tests/test_lapack.py 18 ''; 19 20 preConfigure = '' 21 sed -i '0,/from numpy.distutils.core/s//import setuptools;from numpy.distutils.core/' setup.py 22 ''; 23 24 preBuild = '' 25 echo "Creating site.cfg file..." 26 cat << EOF > site.cfg 27 [openblas] 28 include_dirs = ${passthru.blas}/include 29 library_dirs = ${passthru.blas}/lib 30 EOF 31 ''; 32 33 checkPhase = '' 34 runHook preCheck 35 pushd dist 36 ${python.interpreter} -c 'import scipy; scipy.test("fast", verbose=10)' 37 popd 38 runHook postCheck 39 ''; 40 41 passthru = { 42 blas = numpy.blas; 43 }; 44 45 setupPyBuildFlags = [ "--fcompiler='gnu95'" ]; 46 47 meta = { 48 description = "SciPy (pronounced 'Sigh Pie') is open-source software for mathematics, science, and engineering. "; 49 homepage = http://www.scipy.org/; 50 maintainers = with lib.maintainers; [ fridh ]; 51 } // (args.meta or {}); 52})