From 6d73634f1d1add70f1dd08d292b0a25f55dc3ee5bf60cc15f69c55af2fee966a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 11 Aug 2018 14:43:55 +0000 Subject: [PATCH] - Enable testsuite in multibuild mode as it creates cycle otherwise OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-releases?expand=0&rev=4 --- _multibuild | 3 +++ python-releases.changes | 5 +++++ python-releases.spec | 33 +++++++++++++++++++++++++++++++-- 3 files changed, 39 insertions(+), 2 deletions(-) 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-releases.changes b/python-releases.changes index 2dbfc0b..cb7a24a 100644 --- a/python-releases.changes +++ b/python-releases.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Aug 11 14:43:12 UTC 2018 - tchvatal@suse.com + +- Enable testsuite in multibuild mode as it creates cycle otherwise + ------------------------------------------------------------------- Sat Aug 11 09:50:05 UTC 2018 - tchvatal@suse.com diff --git a/python-releases.spec b/python-releases.spec index 9b499cd..43fd36a 100644 --- a/python-releases.spec +++ b/python-releases.spec @@ -16,8 +16,13 @@ # +%global flavor @BUILD_FLAVOR@%{nil} %{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: python-releases +%if "%{flavor}" == "test" +%bcond_without test +%else +%bcond_with test +%endif Version: 1.6.1 Release: 0 Summary: A Sphinx extension for changelog manipulation @@ -29,8 +34,23 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-Sphinx >= 1.3 -Requires: python-semantic_version < 3.0 +Requires: python-semantic_version +Requires: python-six >= 1.4.1 BuildArch: noarch +%if %{with test} +Name: python-releases-%{flavor} +%else +Name: python-releases +%endif +%if %{with tests} +BuildRequires: %{python_module Sphinx >= 1.3} +BuildRequires: %{python_module invocations} +BuildRequires: %{python_module invoke} +BuildRequires: %{python_module mock >= 1.0.1} +BuildRequires: %{python_module semantic_version} +BuildRequires: %{python_module six >= 1.4.1} +BuildRequires: %{python_module spec >= 0.11.3} +%endif %python_subpackages %description @@ -57,12 +77,21 @@ Specifically: %python_build %install +%if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%if %{with test} +%check +%python_expand invoke-%{$python_bin_suffix} test +%endif %files %{python_files} %doc README.rst %license LICENSE +%if !%{with test} %{python_sitelib}/* +%endif %changelog