From 44490db7c0c12c2b447e1559aa9f92d934adf89809f8bfa3e8340ee2c7a49a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 13 May 2019 23:49:22 +0000 Subject: [PATCH] - 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 --- _multibuild | 3 +++ python-docutils.changes | 5 +++++ python-docutils.spec | 18 +++++++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-docutils.changes b/python-docutils.changes index 0d1efe5..3220b57 100644 --- a/python-docutils.changes +++ b/python-docutils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon May 13 23:48:57 UTC 2019 - Tomáš Chvátal + +- Add multibuild in order to avoid buildcycle with Pillow and friends + ------------------------------------------------------------------- Tue May 7 15:03:33 UTC 2019 - John Vandenberg diff --git a/python-docutils.spec b/python-docutils.spec index 066355a..dc23d97 100644 --- a/python-docutils.spec +++ b/python-docutils.spec @@ -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