1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pytestCheckHook,
7 pythonAtLeast,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "backports-strenum";
13 version = "1.3.1";
14 pyproject = true;
15
16 disabled = pythonOlder "3.8" || pythonAtLeast "3.11";
17
18 src = fetchFromGitHub {
19 owner = "clbarnes";
20 repo = "backports.strenum";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-j5tALFrLeZ8k+GwAaq0ocmcQWvdWkRUHbOVq5Du4mu0=";
23 };
24
25 build-system = [ poetry-core ];
26
27 nativeCheckInputs = [ pytestCheckHook ];
28
29 pythonImportsCheck = [ "backports.strenum" ];
30
31 meta = with lib; {
32 description = "Base class for creating enumerated constants that are also subclasses of str";
33 homepage = "https://github.com/clbarnes/backports.strenum";
34 license = with licenses; [ psfl ];
35 maintainers = with maintainers; [ fab ];
36 };
37}