1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 flit-scm, 6 pytestCheckHook, 7 pythonOlder, 8 pythonAtLeast, 9}: 10 11buildPythonPackage rec { 12 pname = "exceptiongroup"; 13 version = "1.2.0"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "agronholm"; 20 repo = "exceptiongroup"; 21 rev = version; 22 hash = "sha256-iGeaRVJeFAWfJpwr7N4kST7d8YxpX3WgDqQemlR0cLU="; 23 }; 24 25 nativeBuildInputs = [ flit-scm ]; 26 27 doCheck = pythonAtLeast "3.11"; # infinite recursion with pytest 28 29 nativeCheckInputs = [ pytestCheckHook ]; 30 31 disabledTests = 32 if pythonAtLeast "3.12" then 33 [ 34 # https://github.com/agronholm/exceptiongroup/issues/116 35 "test_deep_split" 36 "test_deep_subgroup" 37 ] 38 else 39 null; 40 41 pythonImportsCheck = [ "exceptiongroup" ]; 42 43 meta = with lib; { 44 description = "Backport of PEP 654 (exception groups)"; 45 homepage = "https://github.com/agronholm/exceptiongroup"; 46 changelog = "https://github.com/agronholm/exceptiongroup/blob/${version}/CHANGES.rst"; 47 license = with licenses; [ mit ]; 48 maintainers = with maintainers; [ fab ]; 49 }; 50}