From 030d1ff609a63d96744cc696bf371447840a5d39e437d465790159473b69c222 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 7 Sep 2021 11:06:47 +0000 Subject: [PATCH] - To avoid a build cycle, switch to multibuild. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-google-api-core?expand=0&rev=36 --- _multibuild | 3 +++ python-google-api-core.changes | 5 +++++ python-google-api-core.spec | 17 +++++++++++++++++ 3 files changed, 25 insertions(+) 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-google-api-core.changes b/python-google-api-core.changes index 039a108..39cd59e 100644 --- a/python-google-api-core.changes +++ b/python-google-api-core.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Sep 7 11:04:50 UTC 2021 - Steve Kowalik + +- To avoid a build cycle, switch to multibuild. + ------------------------------------------------------------------- Mon Sep 6 05:22:42 UTC 2021 - Steve Kowalik diff --git a/python-google-api-core.spec b/python-google-api-core.spec index c5d05ab..98f5eed 100644 --- a/python-google-api-core.spec +++ b/python-google-api-core.spec @@ -17,6 +17,14 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif %define skip_python2 1 Name: python-google-api-core Version: 2.0.1 @@ -34,10 +42,13 @@ BuildRequires: %{python_module pytz} BuildRequires: %{python_module requests >= 2.18.0} BuildRequires: %{python_module setuptools >= 40.3.0} # START TESTING SECTION +%if %{with test} +BuildRequires: %{python_module google-api-core >= %{version}} BuildRequires: %{python_module mock} BuildRequires: %{python_module proto-plus} BuildRequires: %{python_module pytest-asyncio} BuildRequires: %{python_module pytest} +%endif # END TESTIN SECTION BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -62,15 +73,21 @@ Core Library for Google Client Libraries. %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