From b20a24aacfe19444e9159242680a77c59a936f8386a4e1722e63d03b0acb4e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 19 May 2020 12:12:43 +0000 Subject: [PATCH] Accepting request 807230 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807230 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rdflib?expand=0&rev=55 --- python-rdflib.changes | 5 +++++ python-rdflib.spec | 35 ++++++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/python-rdflib.changes b/python-rdflib.changes index 9f687d7..480e892 100644 --- a/python-rdflib.changes +++ b/python-rdflib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 19 09:27:40 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Mon Oct 14 14:40:41 UTC 2019 - Matej Cepl diff --git a/python-rdflib.spec b/python-rdflib.spec index 4c270c9..05540f6 100644 --- a/python-rdflib.spec +++ b/python-rdflib.spec @@ -1,7 +1,7 @@ # # spec file for package python-rdflib # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -41,6 +41,8 @@ Requires: python-html5lib Requires: python-isodate Requires: python-pyparsing Requires: python-xml +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch %if %{with tests} BuildRequires: %{python_module SPARQLWrapper} @@ -74,13 +76,18 @@ find rdflib -name "*.py" | xargs sed -i '1 { /^#!/ d }' %python_build pushd docs -make %{?_smp_mflags} html +%make_build html # Remove hidden file rm -r _build/html/.buildinfo popd %install %python_install +%python_clone -a %{buildroot}%{_bindir}/rdfs2dot +%python_clone -a %{buildroot}%{_bindir}/rdfpipe +%python_clone -a %{buildroot}%{_bindir}/rdfgraphisomorphism +%python_clone -a %{buildroot}%{_bindir}/rdf2dot +%python_clone -a %{buildroot}%{_bindir}/csv2rdf %python_expand %fdupes %{buildroot}%{$python_sitelib} %fdupes docs/_build/html @@ -90,14 +97,28 @@ popd %python_exec setup.py -q test %endif +%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 CHANGELOG.md CONTRIBUTORS README.md -%python3_only %{_bindir}/csv2rdf -%python3_only %{_bindir}/rdf2dot -%python3_only %{_bindir}/rdfgraphisomorphism -%python3_only %{_bindir}/rdfpipe -%python3_only %{_bindir}/rdfs2dot +%python_alternative %{_bindir}/csv2rdf +%python_alternative %{_bindir}/rdf2dot +%python_alternative %{_bindir}/rdfgraphisomorphism +%python_alternative %{_bindir}/rdfpipe +%python_alternative %{_bindir}/rdfs2dot %{python_sitelib}/rdflib/ %{python_sitelib}/rdflib-%{version}-py*.egg-info