2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flit-scm,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
pythonAtLeast,
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "exceptiongroup";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "1.2.0";
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "pyproject";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "agronholm";
|
|
|
|
repo = "exceptiongroup";
|
|
|
|
rev = version;
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-iGeaRVJeFAWfJpwr7N4kST7d8YxpX3WgDqQemlR0cLU=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ flit-scm ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
doCheck = pythonAtLeast "3.11"; # infinite recursion with pytest
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
if pythonAtLeast "3.12" then
|
|
|
|
[
|
|
|
|
# https://github.com/agronholm/exceptiongroup/issues/116
|
|
|
|
"test_deep_split"
|
|
|
|
"test_deep_subgroup"
|
|
|
|
]
|
|
|
|
else
|
|
|
|
null;
|
2024-04-21 15:54:59 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "exceptiongroup" ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Backport of PEP 654 (exception groups)";
|
|
|
|
homepage = "https://github.com/agronholm/exceptiongroup";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/agronholm/exceptiongroup/blob/${version}/CHANGES.rst";
|
2022-04-27 09:35:20 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|