otadump: init at 0.1.2 (#329129)
[NixPkgs.git] / pkgs / development / python-modules / python-box / default.nix
blob2ab21191104cbd0d92dc07c5d5b396a940f31d1d
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,
17 buildPythonPackage rec {
18   pname = "python-box";
19   version = "7.2.0";
20   format = "setuptools";
22   disabled = pythonOlder "3.8";
24   src = fetchFromGitHub {
25     owner = "cdgriffith";
26     repo = "Box";
27     rev = "refs/tags/${version}";
28     hash = "sha256-5aORpuh0ezA3mUEpAPANDkdeN8ujNRfCUCV5qamMk68=";
29   };
31   nativeBuildInputs = [
32     cython
33     setuptools
34   ];
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   };
50   nativeCheckInputs = [ pytestCheckHook ] ++ optional-dependencies.all;
52   pythonImportsCheck = [ "box" ];
54   meta = with lib; {
55     description = "Python dictionaries with advanced dot notation access";
56     homepage = "https://github.com/cdgriffith/Box";
57     changelog = "https://github.com/cdgriffith/Box/blob/${version}/CHANGES.rst";
58     license = with licenses; [ mit ];
59     maintainers = with maintainers; [ fab ];
60   };