summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2018-10-17 00:31:08 -0400
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2018-10-18 11:02:23 +0200
commit11707332440cc285f24562a45e96011bdcb66d9d (patch)
tree2ad5c774c5122db8f2ea0eeb8ef1d253500addde /pkgs
parentd954c8ff8275240300d93c6ef577c3fd2c924f59 (diff)
downloadnixlib-11707332440cc285f24562a45e96011bdcb66d9d.tar
nixlib-11707332440cc285f24562a45e96011bdcb66d9d.tar.gz
nixlib-11707332440cc285f24562a45e96011bdcb66d9d.tar.bz2
nixlib-11707332440cc285f24562a45e96011bdcb66d9d.tar.lz
nixlib-11707332440cc285f24562a45e96011bdcb66d9d.tar.xz
nixlib-11707332440cc285f24562a45e96011bdcb66d9d.tar.zst
nixlib-11707332440cc285f24562a45e96011bdcb66d9d.zip
pythonPackages.pympler: refactor move to python-modules
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/pympler/default.nix31
-rw-r--r--pkgs/top-level/python-packages.nix27
2 files changed, 32 insertions, 26 deletions
diff --git a/pkgs/development/python-modules/pympler/default.nix b/pkgs/development/python-modules/pympler/default.nix
new file mode 100644
index 000000000000..1a3eb0475105
--- /dev/null
+++ b/pkgs/development/python-modules/pympler/default.nix
@@ -0,0 +1,31 @@
+{ stdenv
+, buildPythonPackage
+, fetchPypi
+}:
+
+buildPythonPackage rec {
+  pname = "Pympler";
+  version = "0.4.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "0mhyxqlkha98y8mi5zqcjg23r30mgdjdzs05lghbmqfdyvzjh1a3";
+  };
+
+ # Remove test asizeof.flatsize(), broken and can be missed as
+ # test is only useful on python 2.5, see https://github.com/pympler/pympler/issues/22
+ patchPhase = ''
+   substituteInPlace ./test/asizeof/test_asizeof.py --replace "n, e = test_flatsize" "#n, e = test_flatsize"
+   substituteInPlace ./test/asizeof/test_asizeof.py --replace "self.assert_(n," "#self.assert_(n,"
+   substituteInPlace ./test/asizeof/test_asizeof.py --replace "self.assert_(not e" "#self.assert_(not e"
+  '';
+
+  doCheck = stdenv.hostPlatform.isLinux;
+
+  meta = with stdenv.lib; {
+    description = "Tool to measure, monitor and analyze memory behavior";
+    homepage = https://pythonhosted.org/Pympler/;
+    license = licenses.asl20;
+  };
+
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index cbde624cfa1c..252119b1e72a 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2885,32 +2885,7 @@ in {
 
   pymc3 = callPackage ../development/python-modules/pymc3 { };
 
-  pympler = buildPythonPackage rec {
-    pname = "Pympler";
-    version = "0.4.3";
-    name = "${pname}-${version}";
-
-    src = pkgs.fetchurl {
-      url = "mirror://pypi/P/${pname}/${name}.tar.gz";
-      sha256 = "0mhyxqlkha98y8mi5zqcjg23r30mgdjdzs05lghbmqfdyvzjh1a3";
-    };
-
-  # Remove test asizeof.flatsize(), broken and can be missed as
-  # test is only useful on python 2.5, see https://github.com/pympler/pympler/issues/22
-   patchPhase = ''
-     substituteInPlace ./test/asizeof/test_asizeof.py --replace "n, e = test_flatsize" "#n, e = test_flatsize"
-     substituteInPlace ./test/asizeof/test_asizeof.py --replace "self.assert_(n," "#self.assert_(n,"
-     substituteInPlace ./test/asizeof/test_asizeof.py --replace "self.assert_(not e" "#self.assert_(not e"
-    '';
-
-    doCheck = stdenv.hostPlatform.isLinux;
-
-    meta = {
-      description = "Tool to measure, monitor and analyze memory behavior";
-      homepage = https://pythonhosted.org/Pympler/;
-      license = licenses.asl20;
-    };
-  };
+  pympler = callPackage ../development/python-modules/pympler { };
 
   pymysqlsa = self.buildPythonPackage rec {
     name = "pymysqlsa-${version}";