about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/yappi
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/yappi')
-rw-r--r--nixpkgs/pkgs/development/python-modules/yappi/default.nix22
-rw-r--r--nixpkgs/pkgs/development/python-modules/yappi/tests.patch12
2 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/yappi/default.nix b/nixpkgs/pkgs/development/python-modules/yappi/default.nix
new file mode 100644
index 000000000000..6ab776d23072
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/yappi/default.nix
@@ -0,0 +1,22 @@
+{ lib, buildPythonPackage, fetchPypi, nose }:
+
+buildPythonPackage rec {
+  pname = "yappi";
+  version = "1.2.3";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "b8db9bc607610d6da4e27e87ec828ebddec4bdaac89ca07ebfe9a153b0641580";
+  };
+
+  patches = [ ./tests.patch ];
+
+  checkInputs = [ nose ];
+
+  meta = with lib; {
+    homepage = "https://github.com/sumerc/yappi";
+    description = "Python profiler that supports multithreading and measuring CPU time";
+    license = licenses.mit;
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/python-modules/yappi/tests.patch b/nixpkgs/pkgs/development/python-modules/yappi/tests.patch
new file mode 100644
index 000000000000..bff4b28295b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/yappi/tests.patch
@@ -0,0 +1,12 @@
+--- a/tests/test_functionality.py
++++ b/tests/test_functionality.py
+@@ -74,2 +74,3 @@ class BasicUsage(utils.YappiUnitTestCase):
+    

++    @_unittest.skip('wall-clock-time-sensitive')

+     def test_get_clock(self):

+--- a/tests/test_hooks.py
++++ b/tests/test_hooks.py
+@@ -124,2 +124,3 @@ class ContextIdCallbackTest(utils.YappiUnitTestCase):
+ 
++    @unittest.skip('wall-clock-time-sensitive')
+     def test_pause_resume(self):