diff --git a/pkgs/development/python-modules/yappi/default.nix b/pkgs/development/python-modules/yappi/default.nix index e0be34a2d31..b96d4efd44b 100644 --- a/pkgs/development/python-modules/yappi/default.nix +++ b/pkgs/development/python-modules/yappi/default.nix @@ -1,18 +1,22 @@ -{ lib, buildPythonPackage, fetchPypi, isPy27, nose }: +{ lib, buildPythonPackage, fetchFromGitHub, gevent, isPy27, python }: buildPythonPackage rec { pname = "yappi"; - version = "1.2.5"; + version = "1.3.0"; disabled = isPy27; # invalid syntax - src = fetchPypi { - inherit pname version; - sha256 = "ad5fa4caf2859e480ffc4ec3e85615a6f7dea852c8f035f2db723f824ed4ba11"; + src = fetchFromGitHub { + owner = "sumerc"; + repo = pname; + rev = "30f94024a0e2e4fa21c220de6a0dc97b4cb2c319"; + sha256 = "1kvwl3y3c2hivf9y2x1q1s8a2y724iwqd1krq6ryvsbg3inyh8qw"; }; patches = [ ./tests.patch ]; - - checkInputs = [ nose ]; + checkInputs = [ gevent ]; + checkPhase = '' + ${python.interpreter} run_tests.py + ''; meta = with lib; { homepage = "https://github.com/sumerc/yappi"; diff --git a/pkgs/development/python-modules/yappi/tests.patch b/pkgs/development/python-modules/yappi/tests.patch index bff4b28295b..96419e01a26 100644 --- a/pkgs/development/python-modules/yappi/tests.patch +++ b/pkgs/development/python-modules/yappi/tests.patch @@ -1,12 +1,14 @@ --- 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): +@@ -262,1 +262,2 @@ class BasicUsage(utils.YappiUnitTestCase): ++ @unittest.skip('wall-clock-time-sensitive') + def test_get_clock(self): +@@ -363,2 +363,3 @@ class BasicUsage(utils.YappiUnitTestCase): + @unittest.skipIf(os.name == "nt", "do not run on Windows") ++ @unittest.skip('broken-path') + def test_run_as_script(self): --- a/tests/test_hooks.py +++ b/tests/test_hooks.py -@@ -124,2 +124,3 @@ class ContextIdCallbackTest(utils.YappiUnitTestCase): - +@@ -127,1 +127,2 @@ class ContextIdCallbackTest(utils.YappiUnitTestCase): + @unittest.skip('wall-clock-time-sensitive') def test_pause_resume(self):