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