1{ 2 lib, 3 buildPythonPackage, 4 et-xmlfile, 5 fetchFromGitLab, 6 lxml, 7 pandas, 8 pillow, 9 pytest7CheckHook, 10 pythonAtLeast, 11 pythonOlder, 12 setuptools, 13}: 14 15buildPythonPackage rec { 16 pname = "openpyxl"; 17 version = "3.1.5"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchFromGitLab { 23 domain = "foss.heptapod.net"; 24 owner = "openpyxl"; 25 repo = "openpyxl"; 26 rev = "refs/tags/${version}"; 27 hash = "sha256-vp+TIWcHCAWlDaBcmC7w/kV7DZTZpa6463NusaJmqKo="; 28 }; 29 30 build-system = [ setuptools ]; 31 32 dependencies = [ et-xmlfile ]; 33 34 nativeCheckInputs = [ 35 lxml 36 pandas 37 pillow 38 pytest7CheckHook 39 ]; 40 41 pytestFlagsArray = [ 42 "-W" 43 "ignore::DeprecationWarning" 44 ]; 45 46 disabledTests = 47 [ 48 # Tests broken since lxml 2.12; https://foss.heptapod.net/openpyxl/openpyxl/-/issues/2116 49 "test_read" 50 "test_read_comments" 51 "test_ignore_external_blip" 52 "test_from_xml" 53 "test_filenames" 54 "test_exts" 55 "test_from_complex" 56 "test_merge_named_styles" 57 "test_unprotected_cell" 58 "test_none_values" 59 "test_rgb_colors" 60 "test_named_styles" 61 "test_read_ole_link" 62 ] 63 ++ lib.optionals (pythonAtLeast "3.11") [ 64 "test_broken_sheet_ref" 65 "test_name_invalid_index" 66 "test_defined_names_print_area" 67 "test_no_styles" 68 ]; 69 70 pythonImportsCheck = [ "openpyxl" ]; 71 72 meta = with lib; { 73 description = "Python library to read/write Excel 2010 xlsx/xlsm files"; 74 homepage = "https://openpyxl.readthedocs.org"; 75 changelog = "https://foss.heptapod.net/openpyxl/openpyxl/-/blob/${version}/doc/changes.rst"; 76 license = licenses.mit; 77 maintainers = with maintainers; [ lihop ]; 78 }; 79}