14
0
forked from pool/python-rdflib

- Convert to libalternatives

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rdflib?expand=0&rev=80
This commit is contained in:
2025-07-08 08:19:58 +00:00
committed by Git OBS Bridge
parent 561e82e709
commit e6de289b7e
2 changed files with 18 additions and 22 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jul 8 08:17:28 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jul 8 08:07:39 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com> Tue Jul 8 08:07:39 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>

View File

@@ -18,39 +18,37 @@
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "doc" %if "%{flavor}" == "doc"
%bcond_without doc
%define psuffix -doc %define psuffix -doc
%bcond_without doc
%else %else
%bcond_with doc
%define psuffix %{nil} %define psuffix %{nil}
%bcond_with doc
%endif %endif
# Tests don't work and cause a dependency loop with python-SPARQLWrapper # Tests don't work and cause a dependency loop with python-SPARQLWrapper
%bcond_with tests %bcond_with tests
%bcond_without libalternatives
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-rdflib%{psuffix} Name: python-rdflib%{psuffix}
Version: 7.1.4 Version: 7.1.4
Release: 0 Release: 0
Summary: A Python library for working with RDF Summary: A Python library for working with RDF
License: BSD-3-Clause License: BSD-3-Clause
URL: http://rdflib.net/ URL: https://rdflib.net/
Source: https://files.pythonhosted.org/packages/source/r/rdflib/rdflib-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/r/rdflib/rdflib-%{version}.tar.gz
# PATCH-FIX-UPSTREAM sphinx8.patch gh#RDFLib/rdflib#2956 -- daniel.garcia@suse.com # PATCH-FIX-UPSTREAM sphinx8.patch gh#RDFLib/rdflib#2956 -- daniel.garcia@suse.com
Patch0: sphinx8.patch Patch0: sphinx8.patch
# PATCH-FIX-OPENSUSE reproducible-doc-build.patch gh#RDFLib/rdflib#2645 -- daniel.garcia@suse.com # PATCH-FIX-OPENSUSE reproducible-doc-build.patch gh#RDFLib/rdflib#2645 -- daniel.garcia@suse.com
Patch1: reproducible-doc-build.patch Patch1: reproducible-doc-build.patch
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires(post): update-alternatives Requires: alts
Requires(postun): update-alternatives
BuildArch: noarch BuildArch: noarch
%if %{with tests} %if %{with tests}
BuildRequires: %{python_module SPARQLWrapper} BuildRequires: %{python_module SPARQLWrapper}
BuildRequires: %{python_module flake8} BuildRequires: %{python_module flake8}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
%endif %endif
%if %{with doc} %if %{with doc}
BuildRequires: %{python_module rdflib = %{version}} BuildRequires: %{python_module rdflib = %{version}}
BuildRequires: python3-Sphinx BuildRequires: python3-Sphinx
@@ -67,8 +65,8 @@ BuildRequires: %{python_module pyparsing}
BuildRequires: %{python_module wheel} BuildRequires: %{python_module wheel}
BuildRequires: %{python_module xml} BuildRequires: %{python_module xml}
Requires: python-pyparsing Requires: python-pyparsing
%python_subpackages
%endif %endif
%python_subpackages
%description %description
RDFLib is a Python library for working with RDF, a simple yet powerful RDFLib is a Python library for working with RDF, a simple yet powerful
@@ -119,19 +117,12 @@ popd
%else %else
%post %pre
%python_install_alternative rdfs2dot %python_libalternatives_reset_alternative rdfs2dot
%python_install_alternative rdfpipe %python_libalternatives_reset_alternative rdfpipe
%python_install_alternative rdfgraphisomorphism %python_libalternatives_reset_alternative rdfgraphisomorphism
%python_install_alternative rdf2dot %python_libalternatives_reset_alternative rdf2dot
%python_install_alternative csv2rdf %python_libalternatives_reset_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} %files %{python_files}
%license LICENSE %license LICENSE