diff --git a/python-tablib.changes b/python-tablib.changes index 131157e..0296dcd 100644 --- a/python-tablib.changes +++ b/python-tablib.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Jan 20 20:14:38 UTC 2025 - Ben Greiner + +- Fix dependencies: None of the supported packages are hard + requirements. +- Remove xlwt from build set: Not maintained for 7+ years + * Add tablib-tests-noxls.patch + ------------------------------------------------------------------- Sat Jan 18 11:31:03 UTC 2025 - ecsos diff --git a/python-tablib.spec b/python-tablib.spec index 6d3bb6b..005db94 100644 --- a/python-tablib.spec +++ b/python-tablib.spec @@ -1,7 +1,7 @@ # # spec file for package python-tablib # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,8 @@ Summary: Format agnostic tabular data library (XLS, JSON, YAML, CSV) License: MIT URL: https://github.com/jazzband/tablib Source: https://files.pythonhosted.org/packages/source/t/tablib/tablib-%{version}.tar.gz +# PATCH-FEATURE-OPENSUSE tablib-tests-noxls.patch -- disable tests that require xlwt, code@bnavigator.de +Patch0: tablib-tests-noxls.patch BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module base >= 3.9} BuildRequires: %{python_module odfpy} @@ -40,15 +42,14 @@ BuildRequires: %{python_module setuptools} BuildRequires: %{python_module tabulate} BuildRequires: %{python_module wheel} BuildRequires: %{python_module xlrd} -BuildRequires: %{python_module xlwt} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-PyYAML -Requires: python-odfpy -Requires: python-openpyxl >= 2.6.0 -Requires: python-tabulate -Requires: python-xlrd -Requires: python-xlwt +Suggests: python-PyYAML +Suggests: python-odfpy +Suggests: python-openpyxl >= 2.6.0 +Suggests: python-tabulate +Suggests: python-xlrd +Suggests: python-xlwt Suggests: python-pandas BuildArch: noarch %python_subpackages @@ -66,7 +67,7 @@ Output formats supported: - CSV (Sets) %prep -%setup -q -n tablib-%{version} +%autosetup -p1 -n tablib-%{version} # Remove shebang lines from non-executable scripts: find src -name "*.py" | xargs sed -i '1 { /^#!/ d }' sed -i '/addopts/ d' pytest.ini @@ -80,7 +81,8 @@ sed -i '/addopts/ d' pytest.ini %check # v3.2.1: test_cli_export_github fails on Leap 15.3 & .4 due to minor differences in output -%pytest -k 'not test_cli_export_github' +donttest="test_cli_export_github" +%pytest -k "not ($donttest)" %files %{python_files} %license LICENSE diff --git a/tablib-tests-noxls.patch b/tablib-tests-noxls.patch new file mode 100644 index 0000000..880a918 --- /dev/null +++ b/tablib-tests-noxls.patch @@ -0,0 +1,38 @@ +diff -ur tablib-3.7.0/tests/test_tablib.py tablib-3.7.0.patched/tests/test_tablib.py +--- tablib-3.7.0/tests/test_tablib.py 2024-10-08 15:11:38.000000000 +0200 ++++ tablib-3.7.0.patched/tests/test_tablib.py 2025-01-20 21:38:50.331022734 +0100 +@@ -16,6 +16,7 @@ + import xlrd + from odf import opendocument, table + from openpyxl.reader.excel import load_workbook ++import pytest + + import tablib + from tablib.core import Row, detect_format +@@ -53,7 +54,7 @@ + + def _test_export_data_in_all_formats(self, dataset, exclude=()): + all_formats = [ +- 'json', 'yaml', 'csv', 'tsv', 'xls', 'xlsx', 'ods', 'html', 'jira', ++ 'json', 'yaml', 'csv', 'tsv', 'xlsx', 'ods', 'html', 'jira', + 'latex', 'df', 'rst', + ] + for format_ in all_formats: +@@ -400,9 +401,6 @@ + """Test auto format detection.""" + # html, jira, latex, rst are export only. + +- _xls = self.founders.export('xls') +- self.assertEqual(tablib.detect_format(_xls), 'xls') +- + _xlsx = self.founders.export('xlsx') + self.assertEqual(tablib.detect_format(_xlsx), 'xlsx') + +@@ -1280,6 +1278,7 @@ + self.assertEqual(cells[2].getAttribute('datevalue'), '2019-10-04T12:30:08') + + ++@pytest.mark.skip("No XLS support without xlwt") + class XLSTests(BaseTestCase): + def test_xls_format_detect(self): + """Test the XLS format detection."""