14
0
forked from pool/python-rdflib

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
This commit is contained in:
Tomáš Chvátal
2020-05-19 12:12:43 +00:00
committed by Git OBS Bridge
parent 2d9f77fd79
commit b20a24aacf
2 changed files with 33 additions and 7 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue May 19 09:27:40 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 14 14:40:41 UTC 2019 - Matej Cepl <mcepl@suse.com> Mon Oct 14 14:40:41 UTC 2019 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-rdflib # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -41,6 +41,8 @@ Requires: python-html5lib
Requires: python-isodate Requires: python-isodate
Requires: python-pyparsing Requires: python-pyparsing
Requires: python-xml Requires: python-xml
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch BuildArch: noarch
%if %{with tests} %if %{with tests}
BuildRequires: %{python_module SPARQLWrapper} BuildRequires: %{python_module SPARQLWrapper}
@@ -74,13 +76,18 @@ find rdflib -name "*.py" | xargs sed -i '1 { /^#!/ d }'
%python_build %python_build
pushd docs pushd docs
make %{?_smp_mflags} html %make_build html
# Remove hidden file # Remove hidden file
rm -r _build/html/.buildinfo rm -r _build/html/.buildinfo
popd popd
%install %install
%python_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} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%fdupes docs/_build/html %fdupes docs/_build/html
@@ -90,14 +97,28 @@ popd
%python_exec setup.py -q test %python_exec setup.py -q test
%endif %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} %files %{python_files}
%license LICENSE %license LICENSE
%doc CHANGELOG.md CONTRIBUTORS README.md %doc CHANGELOG.md CONTRIBUTORS README.md
%python3_only %{_bindir}/csv2rdf %python_alternative %{_bindir}/csv2rdf
%python3_only %{_bindir}/rdf2dot %python_alternative %{_bindir}/rdf2dot
%python3_only %{_bindir}/rdfgraphisomorphism %python_alternative %{_bindir}/rdfgraphisomorphism
%python3_only %{_bindir}/rdfpipe %python_alternative %{_bindir}/rdfpipe
%python3_only %{_bindir}/rdfs2dot %python_alternative %{_bindir}/rdfs2dot
%{python_sitelib}/rdflib/ %{python_sitelib}/rdflib/
%{python_sitelib}/rdflib-%{version}-py*.egg-info %{python_sitelib}/rdflib-%{version}-py*.egg-info