From fc862c1acbb2f8f7b3a9729387ae97e2b66694082c8c040d7a106cb2bc260773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 17 Jun 2025 09:25:18 +0000 Subject: [PATCH] - Convert to libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-camelot-py?expand=0&rev=4 --- python-camelot-py.changes | 5 +++++ python-camelot-py.spec | 39 ++++++++++++++++++--------------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/python-camelot-py.changes b/python-camelot-py.changes index 4fba8ea..04e4fba 100644 --- a/python-camelot-py.changes +++ b/python-camelot-py.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 17 09:24:50 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Thu Sep 12 19:57:34 UTC 2024 - Aline Werner diff --git a/python-camelot-py.spec b/python-camelot-py.spec index 24b6e24..b3bd09b 100644 --- a/python-camelot-py.spec +++ b/python-camelot-py.spec @@ -1,7 +1,7 @@ # # spec file for package python-camelot-py # -# 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 @@ -16,6 +16,7 @@ # +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-camelot-py Version: 0.11.0 @@ -24,9 +25,6 @@ Summary: PDF Table Extraction for Humans License: MIT URL: https://github.com/camelot-dev/camelot Source: https://github.com/camelot-dev/camelot/archive/refs/tags/v%{version}.tar.gz#/camelot-%{version}.tar.gz -BuildRequires: python-rpm-macros -BuildRequires: %{python_module pip} -BuildRequires: %{python_module setuptools} BuildRequires: %{python_module chardet >= 3.0.4} BuildRequires: %{python_module click >= 6.7} BuildRequires: %{python_module ghostscript >= 0.7} @@ -35,17 +33,14 @@ BuildRequires: %{python_module opencv >= 3.4.2.17} BuildRequires: %{python_module openpyxl >= 2.5.8} BuildRequires: %{python_module pandas >= 0.23.4} BuildRequires: %{python_module pdfminer.six >= 20200726} +BuildRequires: %{python_module pip} BuildRequires: %{python_module pypdf >= 3.0.0} +BuildRequires: %{python_module setuptools} BuildRequires: %{python_module tabulate >= 0.8.9} -# SECTION test requirements -BuildRequires: %{python_module pytest >= 5.4.3} -BuildRequires: %{python_module pytest-cov >= 2.10.0} -BuildRequires: %{python_module pytest-mpl >= 0.11} -BuildRequires: %{python_module typing_extensions} -# /SECTION -Requires(post): update-alternatives -Requires(postun): update-alternatives +BuildRequires: alts BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: alts Requires: python-chardet >= 3.0.4 Requires: python-click >= 6.7 Requires: python-numpy >= 1.13.3 @@ -54,7 +49,13 @@ Requires: python-pandas >= 0.23.4 Requires: python-pdfminer.six >= 20200726 Requires: python-pypdf >= 3.0.0 Requires: python-tabulate >= 0.8.9 -BuildArch: noarch +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module pytest >= 5.4.3} +BuildRequires: %{python_module pytest-cov >= 2.10.0} +BuildRequires: %{python_module pytest-mpl >= 0.11} +BuildRequires: %{python_module typing_extensions} +# /SECTION %python_subpackages %description @@ -71,25 +72,21 @@ Camelot is a Python library that can help you extract tables from PDFs! %python_clone -a %{buildroot}%{_bindir}/camelot %python_expand %fdupes %{buildroot}%{$python_sitelib} -%post -%python_install_alternative camelot - -%postun -%python_uninstall_alternative camelot +%pre +%python_libalternatives_reset_alternative camelot %check # Disable tests that require network connection donttest="test_url_poppler or test_url_ghostscript or test_pages_poppler or test_pages_ghostscript" # Disable tests that require pdftopng package donttest+=" or test_repr_poppler or test_lattice_contour_plot_poppler or test_line_plot_poppler or test_joint_plot_poppler or test_grid_plot_poppler" -# Disable test failing due to issue https://github.com/camelot-dev/camelot/issues/480 +# Disable test failing due to issue https://github.com/camelot-dev/camelot/issues/480 donttest+=" or test_cli_output_format" -# Disable tests that fail due to small differences caused by ghostscript version +# Disable tests that fail due to small differences caused by ghostscript version # (https://github.com/camelot-dev/camelot/pull/356#issuecomment-1474776857) donttest+=" or test_lattice_contour_plot_ghostscript or test_joint_plot_ghostscript" %pytest -k "not ($donttest)" - %files %{python_files} %doc README.md %license LICENSE