at 23.05-pre 1.4 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, isPy3k 5, isPyPy 6, python 7, coverage 8, buildPackages 9}: 10 11buildPythonPackage rec { 12 version = "1.3.7"; 13 pname = "nose"; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"; 18 }; 19 20 # 2to3 was removed in setuptools 58 21 postPatch = '' 22 substituteInPlace setup.py \ 23 --replace "'use_2to3': True," "" 24 25 substituteInPlace setup3lib.py \ 26 --replace "from setuptools.command.build_py import Mixin2to3" "from distutils.util import Mixin2to3" 27 ''; 28 29 preBuild = lib.optionalString (isPy3k && (!isPyPy)) '' 30 ${python.pythonForBuild}/bin/2to3 -wn nose functional_tests unit_tests 31 ''; 32 33 propagatedBuildInputs = [ coverage ]; 34 35 doCheck = false; # lot's of transient errors, too much hassle 36 checkPhase = if isPy3k then '' 37 ${python.pythonForBuild.interpreter} setup.py build_tests 38 '' else "" + '' 39 rm functional_tests/test_multiprocessing/test_concurrent_shared.py* # see https://github.com/nose-devs/nose/commit/226bc671c73643887b36b8467b34ad485c2df062 40 ${python.pythonForBuild.interpreter} selftest.py 41 ''; 42 43 meta = with lib; { 44 description = "A unittest-based testing framework for python that makes writing and running tests easier"; 45 homepage = "https://nose.readthedocs.io/"; 46 license = licenses.lgpl3; 47 maintainers = with maintainers; [ ]; 48 }; 49}