1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 flit-scm, 6 pytestCheckHook, 7 pythonAtLeast, 8 pythonOlder, 9}: 10 11buildPythonPackage rec { 12 pname = "exceptiongroup"; 13 version = "1.2.2"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "agronholm"; 20 repo = "exceptiongroup"; 21 tag = version; 22 hash = "sha256-k88+9FpB/aBun73SnsN6GsBceSUekT8Ig1XBt3hO4ok="; 23 }; 24 25 nativeBuildInputs = [ flit-scm ]; 26 27 nativeCheckInputs = [ pytestCheckHook ]; 28 29 doCheck = pythonAtLeast "3.11"; # infinite recursion with pytest 30 31 pythonImportsCheck = [ "exceptiongroup" ]; 32 33 meta = with lib; { 34 description = "Backport of PEP 654 (exception groups)"; 35 homepage = "https://github.com/agronholm/exceptiongroup"; 36 changelog = "https://github.com/agronholm/exceptiongroup/blob/${version}/CHANGES.rst"; 37 license = with licenses; [ mit ]; 38 maintainers = with maintainers; [ fab ]; 39 }; 40}