2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pyparsing,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2021-06-04 09:07:49 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aenum";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "3.1.15";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-jL12zRjE+HD/ObJChNPqAo++hzGljfOqWB5DTFdblVk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-06-04 09:07:49 +00:00
|
|
|
pyparsing
|
2023-02-02 18:25:31 +00:00
|
|
|
pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "aenum" ];
|
|
|
|
|
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# https://github.com/ethanfurman/aenum/issues/27
|
|
|
|
"test_class_nested_enum_and_pickle_protocol_four"
|
|
|
|
"test_pickle_enum_function_with_qualname"
|
|
|
|
"test_stdlib_inheritence"
|
|
|
|
"test_subclasses_with_getnewargs_ex"
|
|
|
|
"test_arduino_headers"
|
|
|
|
"test_c_header_scanner"
|
|
|
|
"test_extend_flag_backwards_stdlib"
|
|
|
|
]
|
|
|
|
++ lib.optionals (pythonAtLeast "3.12") [
|
|
|
|
# AttributeError: <enum 'Color'> has no attribute 'value'. Did you mean: 'blue'?
|
|
|
|
"test_extend_enum_shadow_property_stdlib"
|
|
|
|
];
|
2023-02-02 18:25:31 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants";
|
2021-01-05 17:05:55 +00:00
|
|
|
homepage = "https://github.com/ethanfurman/aenum";
|
2021-12-06 16:07:01 +00:00
|
|
|
license = licenses.bsd3;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|