2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, attrs
|
2023-02-22 10:55:15 +00:00
|
|
|
, boltons
|
|
|
|
, buildPythonPackage
|
2020-04-24 23:36:52 +00:00
|
|
|
, face
|
2023-02-22 10:55:15 +00:00
|
|
|
, fetchPypi
|
2022-01-13 20:06:32 +00:00
|
|
|
, pytestCheckHook
|
2023-02-22 10:55:15 +00:00
|
|
|
, pythonAtLeast
|
2022-01-13 20:06:32 +00:00
|
|
|
, pythonOlder
|
2023-02-22 10:55:15 +00:00
|
|
|
, pyyaml
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "glom";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "23.1.1";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-t0QjCeAT/rb+qyBhl6v4rsMoNexwnYqSqFFDIvZMDv8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "face==20.1.1" "face"
|
|
|
|
'';
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
boltons
|
|
|
|
attrs
|
|
|
|
face
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# test_cli.py checks the output of running "glom"
|
|
|
|
export PATH=$out/bin:$PATH
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Test is outdated (was made for PyYAML 3.x)
|
|
|
|
"test_main_yaml_target"
|
2023-02-22 10:55:15 +00:00
|
|
|
] ++ lib.optionals (pythonAtLeast "3.11") [
|
|
|
|
"test_regular_error_stack"
|
|
|
|
"test_long_target_repr"
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"glom"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Restructuring data, the Python way";
|
|
|
|
longDescription = ''
|
|
|
|
glom helps pull together objects from other objects in a
|
|
|
|
declarative, dynamic, and downright simple way.
|
|
|
|
'';
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://github.com/mahmoud/glom";
|
|
|
|
changelog = "https://github.com/mahmoud/glom/blob/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ twey ];
|
|
|
|
};
|
|
|
|
}
|