at master 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 cython, 5 fetchFromGitHub, 6 msgpack, 7 pytestCheckHook, 8 pythonOlder, 9 pyyaml, 10 ruamel-yaml, 11 setuptools, 12 toml, 13 tomli, 14 tomli-w, 15}: 16 17buildPythonPackage rec { 18 pname = "python-box"; 19 version = "7.3.2"; 20 pyproject = true; 21 22 disabled = pythonOlder "3.9"; 23 24 src = fetchFromGitHub { 25 owner = "cdgriffith"; 26 repo = "Box"; 27 tag = version; 28 hash = "sha256-aVPjIoizqC0OcG5ziy/lvp/JsFSUvcLUqJ03mKViKFs="; 29 }; 30 31 build-system = [ 32 cython 33 setuptools 34 ]; 35 36 optional-dependencies = { 37 all = [ 38 msgpack 39 ruamel-yaml 40 toml 41 ]; 42 yaml = [ ruamel-yaml ]; 43 ruamel-yaml = [ ruamel-yaml ]; 44 PyYAML = [ pyyaml ]; 45 tomli = [ tomli-w ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; 46 toml = [ toml ]; 47 msgpack = [ msgpack ]; 48 }; 49 50 nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.all; 51 52 disabledTests = [ 53 # ruamel 8.18.13 update changed white space rules 54 "test_to_yaml_ruamel" 55 ]; 56 57 pythonImportsCheck = [ "box" ]; 58 59 meta = with lib; { 60 description = "Python dictionaries with advanced dot notation access"; 61 homepage = "https://github.com/cdgriffith/Box"; 62 changelog = "https://github.com/cdgriffith/Box/blob/${version}/CHANGES.rst"; 63 license = with licenses; [ mit ]; 64 maintainers = with maintainers; [ fab ]; 65 }; 66}