2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
et-xmlfile,
|
|
|
|
fetchFromGitLab,
|
|
|
|
lxml,
|
|
|
|
pandas,
|
|
|
|
pillow,
|
|
|
|
pytest7CheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "openpyxl";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "3.1.2";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2023-05-24 13:37:59 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "foss.heptapod.net";
|
|
|
|
owner = "openpyxl";
|
|
|
|
repo = "openpyxl";
|
2024-01-25 14:12:00 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-SWRbjA83AOLrfe6on2CSb64pH5EWXkfyYcTqWJNBEP0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ et-xmlfile ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeCheckInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
lxml
|
|
|
|
pandas
|
2023-05-24 13:37:59 +00:00
|
|
|
pillow
|
2024-04-21 15:54:59 +00:00
|
|
|
pytest7CheckHook
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
pytestFlagsArray = [
|
2024-01-25 14:12:00 +00:00
|
|
|
"-W"
|
|
|
|
"ignore::DeprecationWarning"
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# Tests broken since lxml 2.12; https://foss.heptapod.net/openpyxl/openpyxl/-/issues/2116
|
|
|
|
"test_read"
|
|
|
|
"test_read_comments"
|
|
|
|
"test_ignore_external_blip"
|
|
|
|
"test_from_xml"
|
|
|
|
"test_filenames"
|
|
|
|
"test_exts"
|
|
|
|
"test_from_complex"
|
|
|
|
"test_merge_named_styles"
|
|
|
|
"test_unprotected_cell"
|
|
|
|
"test_none_values"
|
|
|
|
"test_rgb_colors"
|
|
|
|
"test_named_styles"
|
|
|
|
"test_read_ole_link"
|
|
|
|
]
|
|
|
|
++ lib.optionals (pythonAtLeast "3.11") [
|
|
|
|
"test_broken_sheet_ref"
|
|
|
|
"test_name_invalid_index"
|
|
|
|
"test_defined_names_print_area"
|
|
|
|
"test_no_styles"
|
|
|
|
];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "openpyxl" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Python library to read/write Excel 2010 xlsx/xlsm files";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://openpyxl.readthedocs.org";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://foss.heptapod.net/openpyxl/openpyxl/-/blob/${version}/doc/changes.rst";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lihop ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|