at master 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 isPy27, 6 funcsigs, 7 six, 8 pbr, 9 unittestCheckHook, 10 pytest, 11}: 12 13buildPythonPackage rec { 14 pname = "mock"; 15 version = "3.0.5"; 16 format = "setuptools"; 17 18 src = fetchPypi { 19 inherit pname version; 20 sha256 = "83657d894c90d5681d62155c82bda9c1187827525880eda8ff5df4ec813437c3"; 21 }; 22 23 propagatedBuildInputs = [ 24 six 25 pbr 26 ] 27 ++ lib.optionals isPy27 [ funcsigs ]; 28 29 # On PyPy for Python 2.7 in particular, Mock's tests have a known failure. 30 # Mock upstream has a decoration to disable the failing test and make 31 # everything pass, but it is not yet released. The commit: 32 # https://github.com/testing-cabal/mock/commit/73bfd51b7185#diff-354f30a63fb0907d4ad57269548329e3L12 33 #doCheck = !(python.isPyPy && python.isPy27); 34 doCheck = false; # Infinite recursion pytest 35 36 nativeCheckInputs = [ 37 unittestCheckHook 38 pytest 39 ]; 40 41 meta = with lib; { 42 description = "Mock objects for Python"; 43 homepage = "http://python-mock.sourceforge.net/"; 44 license = licenses.bsd2; 45 }; 46 47}