@@ -12505,48 +12505,20 @@ in modules // {
1250512505 };
1250612506 };
1250712507
12508- numpy = let
12509- support = import ../development/python-modules/numpy-scipy-support.nix {
12510- inherit python;
12511- openblas = pkgs.openblasCompat;
12512- pkgName = "numpy";
12513- };
12514- in buildPythonPackage ( rec {
12515- name = "numpy-${version}";
12516- version = "1.10.4";
12508+ buildNumpyPackage = callPackage ../development/python-modules/numpy.nix {
12509+ gfortran = pkgs.gfortran;
12510+ blas = pkgs.openblasCompat;
12511+ };
12512+
12513+ numpy = self.numpy_1_10;
1251712514
12515+ numpy_1_10 = self.buildNumpyPackage rec {
12516+ version = "1.10.4";
1251812517 src = pkgs.fetchurl {
12519- url = "https://pypi.python.org/packages/source/n/numpy/${name }.tar.gz";
12518+ url = "https://pypi.python.org/packages/source/n/numpy/numpy-${version }.tar.gz";
1252012519 sha256 = "7356e98fbcc529e8d540666f5a919912752e569150e9a4f8d869c686f14c720b";
1252112520 };
12522-
12523- disabled = isPyPy; # WIP
12524-
12525- preConfigure = ''
12526- sed -i 's/-faltivec//' numpy/distutils/system_info.py
12527- '';
12528-
12529- inherit (support) preBuild checkPhase;
12530-
12531- buildInputs = [ pkgs.gfortran self.nose ];
12532- propagatedBuildInputs = [ support.openblas ];
12533-
12534- # Disable failing test_f2py test.
12535- # f2py couldn't be found by test,
12536- # even though it was used successfully to build numpy
12537-
12538- # The large file support test is disabled because it takes forever
12539- # and can cause the machine to run out of disk space when run.
12540- prePatch = ''
12541- sed -i 's/test_f2py/donttest/' numpy/tests/test_scripts.py
12542- sed -i 's/test_large_file_support/donttest/' numpy/lib/tests/test_format.py
12543- '';
12544-
12545- meta = {
12546- description = "Scientific tools for Python";
12547- homepage = "http://numpy.scipy.org/";
12548- };
12549- });
12521+ };
1255012522
1255112523 numpydoc = buildPythonPackage rec {
1255212524 name = "numpydoc-${version}";
@@ -18488,47 +18460,19 @@ in modules // {
1848818460 };
1848918461 };
1849018462
18463+ buildScipyPackage = callPackage ../development/python-modules/scipy.nix {
18464+ gfortran = pkgs.gfortran;
18465+ };
1849118466
18492- scipy = let
18493- support = import ../development/python-modules/numpy-scipy-support.nix {
18494- inherit python;
18495- openblas = pkgs.openblasCompat;
18496- pkgName = "scipy";
18497- };
18498- in buildPythonPackage rec {
18499- name = "scipy-${version}";
18500- version = "0.16.1";
18467+ scipy = self.scipy_0_16;
1850118468
18469+ scipy_0_16 = self.buildScipyPackage rec {
18470+ version = "0.16.1";
1850218471 src = pkgs.fetchurl {
18503- url = "http ://pypi.python.org/packages/source/s/scipy/${name }.tar.gz";
18472+ url = "https ://pypi.python.org/packages/source/s/scipy/scipy-${version }.tar.gz";
1850418473 sha256 = "ecd1efbb1c038accb0516151d1e6679809c6010288765eb5da6051550bf52260";
1850518474 };
18506-
18507- buildInputs = [ pkgs.gfortran self.nose ];
18508- propagatedBuildInputs = [ self.numpy ];
18509-
18510- preConfigure = ''
18511- sed -i '0,/from numpy.distutils.core/s//import setuptools;from numpy.distutils.core/' setup.py
18512- '';
18513-
18514- # First test: RuntimeWarning: Mean of empty slice.
18515- # Second: SyntaxError: invalid syntax. Due to wrapper?
18516- # Third: test checks permissions
18517- prePatch = ''
18518- substituteInPlace scipy/stats/tests/test_stats.py --replace "test_chisquare_masked_arrays" "remove_this_one"
18519- rm scipy/linalg/tests/test_lapack.py
18520- substituteInPlace scipy/weave/tests/test_catalog.py --replace "test_user" "remove_this_one"
18521- '';
18522-
18523- inherit (support) preBuild checkPhase;
18524-
18525- patches = [../development/python-modules/scipy-0.16.1-decorator-fix.patch];
18526- setupPyBuildFlags = [ "--fcompiler='gnu95'" ];
18527-
18528- meta = {
18529- description = "SciPy (pronounced 'Sigh Pie') is open-source software for mathematics, science, and engineering. ";
18530- homepage = http://www.scipy.org/;
18531- };
18475+ numpy = self.numpy_1_10;
1853218476 };
1853318477
1853418478 scikitimage = buildPythonPackage rec {
@@ -18563,7 +18507,7 @@ in modules // {
1856318507 };
1856418508
1856518509 buildInputs = with self; [ nose pillow pkgs.gfortran pkgs.glibcLocales ];
18566- propagatedBuildInputs = with self; [ numpy scipy pkgs.openblas ];
18510+ propagatedBuildInputs = with self; [ numpy scipy numpy.blas ];
1856718511
1856818512 LC_ALL="en_US.UTF-8";
1856918513
0 commit comments