diff options
author | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2022-03-30 00:13:51 +0200 |
---|---|---|
committer | Martin Weinelt <hexa@darmstadt.ccc.de> | 2022-04-13 16:49:36 +0200 |
commit | a82860d6715bc35ff7eebd73ceb91b1ff571dc30 (patch) | |
tree | 7d97571b4d5d74e1d811bdb17580d370ff19fd9a /pkgs/development/python-modules/mock | |
parent | 68de5c37ce4e70bcbbae2f9aeacbc3af1b91bd43 (diff) |
python39Packages.mock: remove no longer required dependencies, enable and fix tests, update homepage
Diffstat (limited to 'pkgs/development/python-modules/mock')
-rw-r--r-- | pkgs/development/python-modules/mock/default.nix | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/mock/default.nix b/pkgs/development/python-modules/mock/default.nix index 72e40d750ed13..464a6ae969d77 100644 --- a/pkgs/development/python-modules/mock/default.nix +++ b/pkgs/development/python-modules/mock/default.nix @@ -1,31 +1,30 @@ { lib , buildPythonPackage , fetchPypi -, isPy27 -, funcsigs -, six -, pbr +, fetchpatch , python +, pythonOlder , pytest }: buildPythonPackage rec { pname = "mock"; version = "4.0.3"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; sha256 = "7d3fbbde18228f4ff2f1f119a45cdffa458b4c0dee32eb4d2bb2f82554bac7bc"; }; - propagatedBuildInputs = [ six pbr ] ++ lib.optionals isPy27 [ funcsigs ]; - - # On PyPy for Python 2.7 in particular, Mock's tests have a known failure. - # Mock upstream has a decoration to disable the failing test and make - # everything pass, but it is not yet released. The commit: - # https://github.com/testing-cabal/mock/commit/73bfd51b7185#diff-354f30a63fb0907d4ad57269548329e3L12 - #doCheck = !(python.isPyPy && python.isPy27); - doCheck = false; # Infinite recursion pytest + patches = [ + (fetchpatch { + url = "https://github.com/testing-cabal/mock/commit/f3e3d82aab0ede7e25273806dc0505574d85eae2.patch"; + sha256 = "sha256-wPrv1/WeICZHn31UqFlICFsny2knvn3+Xg8BZoaGbwQ="; + }) + ]; checkPhase = '' ${python.interpreter} -m unittest discover @@ -37,8 +36,7 @@ buildPythonPackage rec { meta = with lib; { description = "Mock objects for Python"; - homepage = "http://python-mock.sourceforge.net/"; + homepage = "https://github.com/testing-cabal/mock"; license = licenses.bsd2; }; - } |