2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flit-scm,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
2024-09-19 14:19:46 +00:00
|
|
|
pythonOlder,
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "exceptiongroup";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "1.2.1";
|
2024-09-19 14:19:46 +00:00
|
|
|
pyproject = true;
|
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";
|
2024-09-19 14:19:46 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-87HmZsbsoV7QPHux50sYsFY2RaIc3627dH3WAwqXfQU=";
|
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
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
doCheck = pythonAtLeast "3.11"; # infinite recursion with pytest
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|