From b82a5248bf8c7fd8c614aa1e5d4442c0f39ac3f5fa10ef4b5ca0ff41308de01b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 14 Aug 2025 12:42:54 +0000 Subject: [PATCH] - Convert to libalternatives on SLE-16-based and newer systems only OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rdflib?expand=0&rev=82 --- python-rdflib.changes | 5 +++++ python-rdflib.spec | 29 ++++++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/python-rdflib.changes b/python-rdflib.changes index d6ed945..57f6d15 100644 --- a/python-rdflib.changes +++ b/python-rdflib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 14 12:36:39 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems only + ------------------------------------------------------------------- Tue Jul 8 08:17:28 UTC 2025 - Markéta Machová diff --git a/python-rdflib.spec b/python-rdflib.spec index 6d8b7ba..76c4c90 100644 --- a/python-rdflib.spec +++ b/python-rdflib.spec @@ -24,9 +24,13 @@ %define psuffix %{nil} %bcond_with doc %endif +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif # Tests don't work and cause a dependency loop with python-SPARQLWrapper %bcond_with tests -%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-rdflib%{psuffix} Version: 7.1.4 @@ -39,11 +43,16 @@ Source: https://files.pythonhosted.org/packages/source/r/rdflib/rdflib-% Patch0: sphinx8.patch # PATCH-FIX-OPENSUSE reproducible-doc-build.patch gh#RDFLib/rdflib#2645 -- daniel.garcia@suse.com Patch1: reproducible-doc-build.patch -BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: alts BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else +Requires(post): update-alternatives +Requires(postun): update-alternatives +%endif %if %{with tests} BuildRequires: %{python_module SPARQLWrapper} BuildRequires: %{python_module flake8} @@ -124,6 +133,20 @@ popd %python_libalternatives_reset_alternative rdf2dot %python_libalternatives_reset_alternative csv2rdf +%post +%python_install_alternative rdfs2dot +%python_install_alternative rdfpipe +%python_install_alternative rdfgraphisomorphism +%python_install_alternative rdf2dot +%python_install_alternative csv2rdf + +%postun +%python_uninstall_alternative rdfs2dot +%python_uninstall_alternative rdfpipe +%python_uninstall_alternative rdfgraphisomorphism +%python_uninstall_alternative rdf2dot +%python_uninstall_alternative csv2rdf + %files %{python_files} %license LICENSE %doc README.md