at 24.11-pre 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 [ 35 # https://github.com/ethanfurman/aenum/issues/27 36 "test_class_nested_enum_and_pickle_protocol_four" 37 "test_pickle_enum_function_with_qualname" 38 "test_stdlib_inheritence" 39 "test_subclasses_with_getnewargs_ex" 40 "test_arduino_headers" 41 "test_c_header_scanner" 42 "test_extend_flag_backwards_stdlib" 43 ] 44 ++ lib.optionals (pythonAtLeast "3.12") [ 45 # AttributeError: <enum 'Color'> has no attribute 'value'. Did you mean: 'blue'? 46 "test_extend_enum_shadow_property_stdlib" 47 ]; 48 49 meta = with lib; { 50 description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants"; 51 homepage = "https://github.com/ethanfurman/aenum"; 52 license = licenses.bsd3; 53 maintainers = with maintainers; [ vrthra ]; 54 }; 55}