about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichiel Leenaars <ml.software@leenaa.rs>2016-06-16 16:52:37 +0200
committerMichiel Leenaars <ml.software@leenaa.rs>2016-08-08 15:14:22 +0200
commitf6d8566cec1051e01a1fc570d3cae1fcef60c149 (patch)
tree2966683ea13e40ec0aaaa4b346c92fad53ca8b9d
parentfc71e1e178347cb1cacfa31d7e1f9ed37dac2fd1 (diff)
downloadnixlib-f6d8566cec1051e01a1fc570d3cae1fcef60c149.tar
nixlib-f6d8566cec1051e01a1fc570d3cae1fcef60c149.tar.gz
nixlib-f6d8566cec1051e01a1fc570d3cae1fcef60c149.tar.bz2
nixlib-f6d8566cec1051e01a1fc570d3cae1fcef60c149.tar.lz
nixlib-f6d8566cec1051e01a1fc570d3cae1fcef60c149.tar.xz
nixlib-f6d8566cec1051e01a1fc570d3cae1fcef60c149.tar.zst
nixlib-f6d8566cec1051e01a1fc570d3cae1fcef60c149.zip
pythonPackages.pympler: init at 0.4.3
-rw-r--r--pkgs/top-level/python-packages.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 429dbe1606ef..5900ea7ee520 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -13176,6 +13176,31 @@ in modules // {
     };
   };
 
+  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"
+    '';
+
+    meta = {
+      description = "Tool to measure, monitor and analyze memory behavior";
+      homepage = http://pythonhosted.org/Pympler/;
+      license = licenses.asl20;
+    };
+  };
+
   pymysql = buildPythonPackage rec {
     name = "pymysql-${version}";
     version = "0.6.6";