depot/third_party/nixpkgs/pkgs/development/python-modules/python-box/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

61 lines
1.3 KiB
Nix

{
lib,
buildPythonPackage,
cython,
fetchFromGitHub,
msgpack,
pytestCheckHook,
pythonOlder,
pyyaml,
ruamel-yaml,
setuptools,
toml,
tomli,
tomli-w,
}:
buildPythonPackage rec {
pname = "python-box";
version = "7.2.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "cdgriffith";
repo = "Box";
rev = "refs/tags/${version}";
hash = "sha256-5aORpuh0ezA3mUEpAPANDkdeN8ujNRfCUCV5qamMk68=";
};
nativeBuildInputs = [
cython
setuptools
];
passthru.optional-dependencies = {
all = [
msgpack
ruamel-yaml
toml
];
yaml = [ ruamel-yaml ];
ruamel-yaml = [ ruamel-yaml ];
PyYAML = [ pyyaml ];
tomli = [ tomli-w ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
toml = [ toml ];
msgpack = [ msgpack ];
};
nativeCheckInputs = [ pytestCheckHook ] ++ passthru.optional-dependencies.all;
pythonImportsCheck = [ "box" ];
meta = with lib; {
description = "Python dictionaries with advanced dot notation access";
homepage = "https://github.com/cdgriffith/Box";
changelog = "https://github.com/cdgriffith/Box/blob/${version}/CHANGES.rst";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}