at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pyparsing, 6 pytestCheckHook, 7 pythonAtLeast, 8 pythonOlder, 9 setuptools, 10}: 11 12buildPythonPackage rec { 13 pname = "aenum"; 14 version = "3.1.15"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-jL12zRjE+HD/ObJChNPqAo++hzGljfOqWB5DTFdblVk="; 22 }; 23 24 nativeBuildInputs = [ setuptools ]; 25 26 nativeCheckInputs = [ 27 pyparsing 28 pytestCheckHook 29 ]; 30 31 pythonImportsCheck = [ "aenum" ]; 32 33 disabledTests = [ 34 # https://github.com/ethanfurman/aenum/issues/27 35 "test_class_nested_enum_and_pickle_protocol_four" 36 "test_pickle_enum_function_with_qualname" 37 "test_stdlib_inheritence" 38 "test_subclasses_with_getnewargs_ex" 39 "test_arduino_headers" 40 "test_c_header_scanner" 41 "test_extend_flag_backwards_stdlib" 42 ] 43 ++ lib.optionals (pythonAtLeast "3.12") [ 44 # AttributeError: <enum 'Color'> has no attribute 'value'. Did you mean: 'blue'? 45 "test_extend_enum_shadow_property_stdlib" 46 ]; 47 48 meta = with lib; { 49 description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants"; 50 homepage = "https://github.com/ethanfurman/aenum"; 51 license = licenses.bsd3; 52 maintainers = [ ]; 53 }; 54}