1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hypothesis,
6 poetry-core,
7 pytestCheckHook,
8 pythonOlder,
9 pythonAtLeast,
10}:
11
12buildPythonPackage rec {
13 pname = "collections-extended";
14 version = "2.0.2";
15 format = "pyproject";
16
17 # https://github.com/mlenzen/collections-extended/issues/198
18 disabled = pythonOlder "3.6" || pythonAtLeast "3.11";
19
20 src = fetchFromGitHub {
21 owner = "mlenzen";
22 repo = pname;
23 rev = "v${version}";
24 hash = "sha256-cK13+CQUELKSiLpG747+C+RB5b6luu0mWLLXTT+uGH4=";
25 };
26
27 nativeBuildInputs = [ poetry-core ];
28
29 nativeCheckInputs = [
30 hypothesis
31 pytestCheckHook
32 ];
33
34 pythonImportsCheck = [ "collections_extended" ];
35
36 meta = with lib; {
37 description = "Extra Python Collections - bags (multisets), setlists (unique list/indexed set), RangeMap and IndexedDict";
38 homepage = "https://github.com/mlenzen/collections-extended";
39 license = licenses.asl20;
40 maintainers = with maintainers; [ exarkun ];
41 };
42}