python.pkgs.numpy: move and get rid of multiple versions

This commit is contained in:
Frederik Rietdijk 2017-05-16 09:22:07 +02:00
parent 9174bd2538
commit c9b4a2f319
3 changed files with 15 additions and 42 deletions

View File

@ -1,16 +1,17 @@
{lib, python, buildPythonPackage, isPy27, isPyPy, gfortran, nose, blas}: {lib, fetchurl, python, buildPythonPackage, isPy27, isPyPy, gfortran, nose, blas}:
args: buildPythonPackage rec {
pname = "numpy";
version = "1.12.1";
name = "${pname}-${version}";
let src = fetchurl {
inherit (args) version; url = "mirror://pypi/n/numpy/numpy-${version}.zip";
in buildPythonPackage (args // rec { sha256 = "a65266a4ad6ec8936a1bc85ce51f8600634a31a258b722c9274a80ff189d9542";
};
name = "numpy-${version}";
disabled = isPyPy; disabled = isPyPy;
buildInputs = args.buildInputs or [ gfortran nose ]; buildInputs = [ gfortran nose blas ];
propagatedBuildInputs = args.propagatedBuildInputs or [ passthru.blas ];
patches = lib.optionals (python.hasDistutilsCxxPatch or false) [ patches = lib.optionals (python.hasDistutilsCxxPatch or false) [
# See cpython 2.7 patches. # See cpython 2.7 patches.
@ -26,8 +27,8 @@ in buildPythonPackage (args // rec {
echo "Creating site.cfg file..." echo "Creating site.cfg file..."
cat << EOF > site.cfg cat << EOF > site.cfg
[openblas] [openblas]
include_dirs = ${passthru.blas}/include include_dirs = ${blas}/include
library_dirs = ${passthru.blas}/lib library_dirs = ${blas}/lib
EOF EOF
''; '';
@ -56,5 +57,5 @@ in buildPythonPackage (args // rec {
description = "Scientific tools for Python"; description = "Scientific tools for Python";
homepage = "http://numpy.scipy.org/"; homepage = "http://numpy.scipy.org/";
maintainers = with lib.maintainers; [ fridh ]; maintainers = with lib.maintainers; [ fridh ];
} // (args.meta or {}); };
}) }

View File

@ -15814,38 +15814,10 @@ in {
}; };
}; };
numpy = callPackage ../development/python-modules/numpy {
buildNumpyPackage = callPackage ../development/python-modules/numpy.nix {
gfortran = pkgs.gfortran;
blas = pkgs.openblasCompat; blas = pkgs.openblasCompat;
}; };
numpy = self.numpy_1_12;
numpy_1_10 = self.buildNumpyPackage rec {
version = "1.10.4";
src = pkgs.fetchurl {
url = "mirror://pypi/n/numpy/numpy-${version}.tar.gz";
sha256 = "7356e98fbcc529e8d540666f5a919912752e569150e9a4f8d869c686f14c720b";
};
};
numpy_1_11 = self.buildNumpyPackage rec {
version = "1.11.3";
src = pkgs.fetchurl {
url = "mirror://pypi/n/numpy/numpy-${version}.zip";
sha256 = "2e0fc5248246a64628656fe14fcab0a959741a2820e003bd15538226501b82f7";
};
};
numpy_1_12 = self.buildNumpyPackage rec {
version = "1.12.1";
src = pkgs.fetchurl {
url = "mirror://pypi/n/numpy/numpy-${version}.zip";
sha256 = "a65266a4ad6ec8936a1bc85ce51f8600634a31a258b722c9274a80ff189d9542";
};
};
numpydoc = buildPythonPackage rec { numpydoc = buildPythonPackage rec {
pname = "numpydoc"; pname = "numpydoc";
name = "${pname}-${version}"; name = "${pname}-${version}";