1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytestCheckHook
5, pythonAtLeast
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "frozendict";
11 version = "2.3.8";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "Marco-Sulla";
18 repo = "python-frozendict";
19 rev = "refs/tags/v${version}";
20 hash = "sha256-4a0DvZOzNJqpop7wi+FagUR+8oaekz4EDNIYdUaAWC8=";
21 };
22
23 nativeCheckInputs = [
24 pytestCheckHook
25 ];
26
27 pythonImportsCheck = [
28 "frozendict"
29 ];
30
31 preCheck = ''
32 pushd test
33 '';
34
35 disabledTests = lib.optionals (pythonAtLeast "3.11") [
36 # https://github.com/Marco-Sulla/python-frozendict/issues/68
37 "test_c_extension"
38 ];
39
40 meta = with lib; {
41 description = "Module for immutable dictionary";
42 homepage = "https://github.com/Marco-Sulla/python-frozendict";
43 changelog = "https://github.com/Marco-Sulla/python-frozendict/releases/tag/v${version}";
44 license = licenses.lgpl3Only;
45 maintainers = with maintainers; [ pbsds ];
46 };
47}