From ea2c573b3b6a4c0f498cada3c1756f767162683c Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 16 May 2017 09:22:46 +0200 Subject: python.pkgs.scipy: move expression and keep only a single version --- pkgs/development/python-modules/scipy.nix | 52 ---------------------- pkgs/development/python-modules/scipy/default.nix | 53 +++++++++++++++++++++++ 2 files changed, 53 insertions(+), 52 deletions(-) delete mode 100644 pkgs/development/python-modules/scipy.nix create mode 100644 pkgs/development/python-modules/scipy/default.nix (limited to 'pkgs/development/python-modules') diff --git a/pkgs/development/python-modules/scipy.nix b/pkgs/development/python-modules/scipy.nix deleted file mode 100644 index 023335a5e347..000000000000 --- a/pkgs/development/python-modules/scipy.nix +++ /dev/null @@ -1,52 +0,0 @@ -{lib, python, buildPythonPackage, isPyPy, gfortran, nose}: - -args: - -let - inherit (args) version; - inherit (args) numpy; -in buildPythonPackage (args // rec { - - name = "scipy-${version}"; - - buildInputs = (args.buildInputs or [ gfortran nose ]); - propagatedBuildInputs = (args.propagatedBuildInputs or [ passthru.blas numpy]); - - # Remove tests because of broken wrapper - prePatch = '' - rm scipy/linalg/tests/test_lapack.py - ''; - - preConfigure = '' - sed -i '0,/from numpy.distutils.core/s//import setuptools;from numpy.distutils.core/' setup.py - ''; - - preBuild = '' - echo "Creating site.cfg file..." - cat << EOF > site.cfg - [openblas] - include_dirs = ${passthru.blas}/include - library_dirs = ${passthru.blas}/lib - EOF - ''; - - checkPhase = '' - runHook preCheck - pushd dist - ${python.interpreter} -c 'import scipy; scipy.test("fast", verbose=10)' - popd - runHook postCheck - ''; - - passthru = { - blas = numpy.blas; - }; - - setupPyBuildFlags = [ "--fcompiler='gnu95'" ]; - - meta = { - description = "SciPy (pronounced 'Sigh Pie') is open-source software for mathematics, science, and engineering. "; - homepage = http://www.scipy.org/; - maintainers = with lib.maintainers; [ fridh ]; - } // (args.meta or {}); -}) diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix new file mode 100644 index 000000000000..a7428f134a7a --- /dev/null +++ b/pkgs/development/python-modules/scipy/default.nix @@ -0,0 +1,53 @@ +{lib, fetchurl, python, buildPythonPackage, isPyPy, gfortran, nose, numpy}: + +buildPythonPackage rec { + pname = "scipy"; + version = "0.19.0"; + name = "${pname}-${version}"; + + src = fetchurl { + url = "mirror://pypi/s/scipy/scipy-${version}.zip"; + sha256 = "4190d34bf9a09626cd42100bbb12e3d96b2daf1a8a3244e991263eb693732122"; + }; + + buildInputs = [ gfortran nose numpy.blas ]; + propagatedBuildInputs = [ numpy ]; + + # Remove tests because of broken wrapper + prePatch = '' + rm scipy/linalg/tests/test_lapack.py + ''; + + preConfigure = '' + sed -i '0,/from numpy.distutils.core/s//import setuptools;from numpy.distutils.core/' setup.py + ''; + + preBuild = '' + echo "Creating site.cfg file..." + cat << EOF > site.cfg + [openblas] + include_dirs = ${numpy.blas}/include + library_dirs = ${numpy.blas}/lib + EOF + ''; + + checkPhase = '' + runHook preCheck + pushd dist + ${python.interpreter} -c 'import scipy; scipy.test("fast", verbose=10)' + popd + runHook postCheck + ''; + + passthru = { + blas = numpy.blas; + }; + + setupPyBuildFlags = [ "--fcompiler='gnu95'" ]; + + meta = { + description = "SciPy (pronounced 'Sigh Pie') is open-source software for mathematics, science, and engineering. "; + homepage = http://www.scipy.org/; + maintainers = with lib.maintainers; [ fridh ]; + }; +} -- cgit 1.4.1