nixpkgs/pkgs/development/python-modules/exceptiongroup/default.nix
Martin Weinelt 39f4004b0e python3Packages.exceptiongroup: Disable tests on python310
Since pytest now requires exceptiongroup we can't use it to test the
package, because it causes an infinite recursion.
2023-01-05 01:08:47 +01:00

48 lines
987 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, flit-scm
, pytestCheckHook
, pythonOlder
, pythonAtLeast
}:
buildPythonPackage rec {
pname = "exceptiongroup";
version = "1.0.4";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "agronholm";
repo = "exceptiongroup";
rev = version;
hash = "sha256-csyDWVvcsAMzgomb0xq0NbVP7qYQpDv9obBGANlwiVI=";
};
nativeBuildInputs = [
flit-scm
];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
doCheck = pythonAtLeast "3.11"; # infinite recursion with pytest
checkInputs = [
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 ];
};
}