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 preConfigure = '' 16 sed -i '0,/from numpy.distutils.core/s//import setuptools;from numpy.distutils.core/' setup.py 17 ''; 18 19 preBuild = '' 20 echo "Creating site.cfg file..." 21 cat << EOF > site.cfg 22 [openblas] 23 include_dirs = ${passthru.blas}/include 24 library_dirs = ${passthru.blas}/lib 25 EOF 26 ''; 27 28 checkPhase = '' 29 runHook preCheck 30 pushd dist 31 ${python.interpreter} -c 'import scipy; scipy.test("fast", verbose=10)' 32 popd 33 runHook postCheck 34 ''; 35 36 passthru = { 37 blas = numpy.blas; 38 }; 39 40 setupPyBuildFlags = [ "--fcompiler='gnu95'" ]; 41 42 meta = { 43 description = "SciPy (pronounced 'Sigh Pie') is open-source software for mathematics, science, and engineering. "; 44 homepage = http://www.scipy.org/; 45 maintainers = with lib.maintainers; [ fridh ]; 46 } // (args.meta or {}); 47})