nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 flit-scm,
6 pytestCheckHook,
7 pythonAtLeast,
8 pythonOlder,
9 typing-extensions,
10}:
11
12buildPythonPackage rec {
13 pname = "exceptiongroup";
14 version = "1.3.1";
15 pyproject = true;
16
17 src = fetchFromGitHub {
18 owner = "agronholm";
19 repo = "exceptiongroup";
20 tag = version;
21 hash = "sha256-3WInufN+Pp6vB/Gik6e8V1a34Dr/oiH3wDMB+2lHRMM=";
22 };
23
24 build-system = [ flit-scm ];
25
26 dependencies = lib.optionals (pythonOlder "3.13") [ typing-extensions ];
27
28 nativeCheckInputs = [ pytestCheckHook ];
29
30 doCheck = pythonAtLeast "3.11"; # infinite recursion with pytest
31
32 disabledTests = lib.optionals (pythonAtLeast "3.14") [
33 # RecursionError not raised
34 "test_deep_split"
35 "test_deep_subgroup"
36 ];
37
38 pythonImportsCheck = [ "exceptiongroup" ];
39
40 meta = {
41 description = "Backport of PEP 654 (exception groups)";
42 homepage = "https://github.com/agronholm/exceptiongroup";
43 changelog = "https://github.com/agronholm/exceptiongroup/blob/${version}/CHANGES.rst";
44 license = with lib.licenses; [ mit ];
45 maintainers = with lib.maintainers; [ fab ];
46 };
47}