From b3624afdb0a6cfca531578d77546e21c7bc594f20f70ba00fe31fdcd3e4be966 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 10 Nov 2021 01:26:54 +0000 Subject: [PATCH] - Add multibuild to defeat a build loop. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-proto-plus?expand=0&rev=7 --- _multibuild | 3 +++ python-proto-plus.changes | 5 +++++ python-proto-plus.spec | 19 +++++++++++++++++-- 3 files changed, 25 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-proto-plus.changes b/python-proto-plus.changes index 8db217d..5813a91 100644 --- a/python-proto-plus.changes +++ b/python-proto-plus.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Nov 10 01:25:57 UTC 2021 - Steve Kowalik + +- Add multibuild to defeat a build loop. + ------------------------------------------------------------------- Fri Sep 10 10:52:33 UTC 2021 - Matthias Fehring diff --git a/python-proto-plus.spec b/python-proto-plus.spec index 5d768c3..af499aa 100644 --- a/python-proto-plus.spec +++ b/python-proto-plus.spec @@ -1,5 +1,5 @@ # -# spec file for package python-proto-plus +# spec file # # Copyright (c) 2021 SUSE LLC # @@ -17,9 +17,16 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif %define skip_python2 1 %define modname proto-plus -Name: python-proto-plus +Name: python-proto-plus%{psuffix} Version: 1.19.0 Release: 0 Summary: Pythonic Protocol Buffers @@ -31,8 +38,10 @@ BuildRequires: %{python_module protobuf >= 3.12.0} BuildRequires: %{python_module setuptools} BuildRequires: python-rpm-macros # SECTION test requirements +%if %{with test} BuildRequires: %{python_module google-api-core >= 1.22.2} BuildRequires: %{python_module pytest} +%endif # /SECTION BuildRequires: fdupes Requires: python-protobuf >= 3.12.0 @@ -52,15 +61,21 @@ that largely behave like native Python types. %python_build %install +%if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check +%if %{with test} %pytest +%endif +%if !%{with test} %files %{python_files} %license LICENSE %doc README.rst %{python_sitelib}/* +%endif %changelog