nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 40 lines 1.2 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, six 5, traceback2 6, pythonAtLeast 7}: 8 9buildPythonPackage rec { 10 version = "1.1.0"; 11 pname = "unittest2"; 12 13 src = fetchPypi { 14 inherit pname version; 15 sha256 = "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"; 16 }; 17 18 propagatedBuildInputs = [ six traceback2 ]; 19 20 # 1.0.0 and up create a circle dependency with traceback2/pbr 21 doCheck = false; 22 23 postPatch = '' 24 # argparse is needed for python < 2.7, which we do not support anymore. 25 substituteInPlace setup.py --replace "argparse" "" 26 27 # fixes a transient error when collecting tests, see https://bugs.launchpad.net/python-neutronclient/+bug/1508547 28 sed -i '510i\ return None, False' unittest2/loader.py 29 # https://github.com/pypa/packaging/pull/36 30 sed -i 's/version=VERSION/version=str(VERSION)/' setup.py 31 ''; 32 33 meta = with lib; { 34 description = "A backport of the new features added to the unittest testing framework"; 35 homepage = "https://pypi.org/project/unittest2/"; 36 license = licenses.bsd0; 37 # AttributeError: module 'collections' has no attribute 'MutableMapping' 38 broken = pythonAtLeast "3.10"; 39 }; 40}