9 buildPythonPackage rec {
14 inherit pname version;
15 sha256 = "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212";
18 patches = lib.optionals (pythonAtLeast "3.7") [
19 ./collections-compat.patch
22 propagatedBuildInputs = [ six traceback2 ];
24 # 1.0.0 and up create a circle dependency with traceback2/pbr
28 # argparse is needed for python < 2.7, which we do not support anymore.
29 substituteInPlace setup.py --replace "argparse" ""
31 # fixes a transient error when collecting tests, see https://bugs.launchpad.net/python-neutronclient/+bug/1508547
32 sed -i '510i\ return None, False' unittest2/loader.py
33 # https://github.com/pypa/packaging/pull/36
34 sed -i 's/version=VERSION/version=str(VERSION)/' setup.py
38 description = "A backport of the new features added to the unittest testing framework";
39 homepage = "https://pypi.org/project/unittest2/";
40 license = licenses.bsd0;