- Add multibuild in order to avoid buildcycle with Pillow and friends

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docutils?expand=0&rev=52
This commit is contained in:
Tomáš Chvátal 2019-05-13 23:49:22 +00:00 committed by Git OBS Bridge
parent 3736bf6346
commit 44490db7c0
3 changed files with 25 additions and 1 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon May 13 23:48:57 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Add multibuild in order to avoid buildcycle with Pillow and friends
-------------------------------------------------------------------
Tue May 7 15:03:33 UTC 2019 - John Vandenberg <jayvdb@gmail.com>

View File

@ -16,8 +16,16 @@
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-docutils
Name: python-docutils%{psuffix}
Version: 0.14
Release: 0
Summary: Python Documentation Utilities
@ -26,9 +34,11 @@ Group: Development/Languages/Python
URL: https://pypi.python.org/pypi/docutils/
Source: https://files.pythonhosted.org/packages/source/d/docutils/docutils-%{version}.tar.gz
Source99: python-docutils-rpmlintrc
%if %{with test}
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module Pygments}
BuildRequires: %{python_module roman}
%endif
BuildRequires: %{python_module xml}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -69,6 +79,7 @@ mv test test%{python2_bin_suffix}
mv test3 test%{python3_bin_suffix}
%install
%if !%{with test}
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
@ -79,6 +90,7 @@ ln -s -f %{_sysconfdir}/alternatives/rst2html4 %{buildroot}%{_bindir}/rst2html4
# To avoid conflicts with the rst2html5 package
mv %{buildroot}%{_bindir}/rst2html5 %{buildroot}%{_bindir}/rst2html5-docutils
ln -s -f %{_sysconfdir}/alternatives/rst2html5 %{buildroot}%{_bindir}/rst2html5
%endif
%ifpython3
%post
@ -97,8 +109,11 @@ fi
%endif
%check
%if %{with test}
%python_exec test%{$python_bin_suffix}/alltests.py
%endif
%if !%{with test}
%files %{python_files}
%license COPYING.txt licenses/*.txt
%doc FAQ.txt HISTORY.txt README.txt THANKS.txt BUGS.txt docs/*
@ -120,5 +135,6 @@ fi
%python3_only %ghost %{_sysconfdir}/alternatives/rst2html5
%{python_sitelib}/docutils/
%{python_sitelib}/docutils-%{version}-py%{python_version}.egg-info
%endif
%changelog