Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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 pytestFlags = [ 42 "-Wignore::DeprecationWarning" 43 ]; 44 45 disabledTests = [ 46 # Tests broken since lxml 2.12; https://foss.heptapod.net/openpyxl/openpyxl/-/issues/2116 47 "test_read" 48 "test_read_comments" 49 "test_ignore_external_blip" 50 "test_from_xml" 51 "test_filenames" 52 "test_exts" 53 "test_from_complex" 54 "test_merge_named_styles" 55 "test_unprotected_cell" 56 "test_none_values" 57 "test_rgb_colors" 58 "test_named_styles" 59 "test_read_ole_link" 60 ] 61 ++ lib.optionals (pythonAtLeast "3.11") [ 62 "test_broken_sheet_ref" 63 "test_name_invalid_index" 64 "test_defined_names_print_area" 65 "test_no_styles" 66 ]; 67 68 pythonImportsCheck = [ "openpyxl" ]; 69 70 meta = with lib; { 71 description = "Python library to read/write Excel 2010 xlsx/xlsm files"; 72 homepage = "https://openpyxl.readthedocs.org"; 73 changelog = "https://foss.heptapod.net/openpyxl/openpyxl/-/blob/${version}/doc/changes.rst"; 74 license = licenses.mit; 75 maintainers = with maintainers; [ lihop ]; 76 }; 77}