depot/third_party/nixpkgs/pkgs/development/python-modules/exceptiongroup/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

47 lines
993 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, flit-scm
, pytestCheckHook
, pythonOlder
, pythonAtLeast
}:
buildPythonPackage rec {
pname = "exceptiongroup";
version = "1.1.2";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "agronholm";
repo = "exceptiongroup";
rev = version;
hash = "sha256-19taP6adzmO4zH2As1OTXeYNFj6KwjhxBr09X+SrZRk=";
};
nativeBuildInputs = [
flit-scm
];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
doCheck = pythonAtLeast "3.11"; # infinite recursion with pytest
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"exceptiongroup"
];
meta = with lib; {
description = "Backport of PEP 654 (exception groups)";
homepage = "https://github.com/agronholm/exceptiongroup";
changelog = "https://github.com/agronholm/exceptiongroup/blob/${version}/CHANGES.rst";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}