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