From 66ce84b61976f533251a1bd6a5f032efc8741fa1 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Sat, 12 Aug 2017 09:10:32 +0200 Subject: [PATCH] python.pkgs.bottleneck: move expression --- .../python-modules/bottleneck/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +------------ 2 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/bottleneck/default.nix diff --git a/pkgs/development/python-modules/bottleneck/default.nix b/pkgs/development/python-modules/bottleneck/default.nix new file mode 100644 index 00000000000..2c1850b86ab --- /dev/null +++ b/pkgs/development/python-modules/bottleneck/default.nix @@ -0,0 +1,26 @@ +{ lib +, buildPythonPackage +, fetchPypi +, nose +, numpy +, python +}: + +buildPythonPackage rec { + pname = "Bottleneck"; + name = "Bottleneck-${version}"; + version = "1.2.0"; + src = fetchPypi { + inherit pname version; + sha256 = "3bec84564a4adbe97c24e875749b949a19cfba4e4588be495cc441db7c6b05e8"; + }; + + checkInputs = [ nose ]; + propagatedBuildInputs = [ numpy ]; + checkPhase = '' + nosetests -v $out/${python.sitePackages} + ''; + postPatch = '' + substituteInPlace setup.py --replace "__builtins__.__NUMPY_SETUP__ = False" "" + ''; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0e308a2f64b..54cc59be09a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -16015,23 +16015,7 @@ in { }; - bottleneck = buildPythonPackage rec { - name = "Bottleneck-${version}"; - version = "1.2.0"; - src = pkgs.fetchurl { - url = "mirror://pypi/B/Bottleneck/Bottleneck-${version}.tar.gz"; - sha256 = "3bec84564a4adbe97c24e875749b949a19cfba4e4588be495cc441db7c6b05e8"; - }; - - buildInputs = with self; [ nose ]; - propagatedBuildInputs = [self.numpy]; - checkPhase = '' - nosetests -v $out/${python.sitePackages} - ''; - postPatch = '' - substituteInPlace setup.py --replace "__builtins__.__NUMPY_SETUP__ = False" "" - ''; - }; + bottleneck = callPackage ../development/python-modules/bottleneck { }; paho-mqtt = buildPythonPackage rec { name = "paho-mqtt-${version}";