From fe78d28be2cf70702fa1f9b68aeda2f3f5ae5df13e36d4742a51e40134baa596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 10 Jun 2020 11:46:58 +0000 Subject: [PATCH 1/2] Accepting request 813148 from home:mcalabkova:branches:devel:languages:python - replace nose OBS-URL: https://build.opensuse.org/request/show/813148 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-extras?expand=0&rev=26 --- python-extras.changes | 5 +++++ python-extras.spec | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/python-extras.changes b/python-extras.changes index b950b48..ddb6b7e 100644 --- a/python-extras.changes +++ b/python-extras.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 10 09:07:14 UTC 2020 - Marketa Calabkova + +- replace nose + ------------------------------------------------------------------- Mon Oct 14 13:37:36 UTC 2019 - Matej Cepl diff --git a/python-extras.spec b/python-extras.spec index df806b9..6036178 100644 --- a/python-extras.spec +++ b/python-extras.spec @@ -1,7 +1,7 @@ # # spec file for package python-extras # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} # A build cycle exists between python-extras and python-testtools. Thus, only # enable testing with a build conditional (off by default): -%bcond_with tests +%bcond_without tests Name: python-extras Version: 1.0.0 Release: 0 @@ -35,7 +35,6 @@ BuildRequires: python-rpm-macros BuildArch: noarch # Test requirements: %if %{with tests} -BuildRequires: %{python_module nose} BuildRequires: %{python_module testtools} %endif %python_subpackages @@ -57,7 +56,7 @@ general use outside of a testing context. %if %{with tests} %check -%python_exec %{_bindir}/nosetests +%python_exec -m unittest discover %endif %files %{python_files} From 9572ab1fe397eae4b70840dac700ade3a98721d164a45445e1fbdd6c1cace57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Thu, 11 Jun 2020 11:19:45 +0000 Subject: [PATCH 2/2] Accepting request 813457 from home:mcalabkova:branches:devel:languages:python - enable testing by default with multibuild OBS-URL: https://build.opensuse.org/request/show/813457 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-extras?expand=0&rev=27 --- _multibuild | 3 +++ python-extras.changes | 1 + python-extras.spec | 22 ++++++++++++++++------ 3 files changed, 20 insertions(+), 6 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-extras.changes b/python-extras.changes index ddb6b7e..70779a5 100644 --- a/python-extras.changes +++ b/python-extras.changes @@ -2,6 +2,7 @@ Wed Jun 10 09:07:14 UTC 2020 - Marketa Calabkova - replace nose +- enable testing by default with multibuild ------------------------------------------------------------------- Mon Oct 14 13:37:36 UTC 2019 - Matej Cepl diff --git a/python-extras.spec b/python-extras.spec index 6036178..f69302c 100644 --- a/python-extras.spec +++ b/python-extras.spec @@ -17,10 +17,16 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -# A build cycle exists between python-extras and python-testtools. Thus, only -# enable testing with a build conditional (off by default): -%bcond_without tests -Name: python-extras +# A build cycle exists between python-extras and python-testtools. +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-extras%{psuffix} Version: 1.0.0 Release: 0 Summary: Extra bits for Python @@ -34,7 +40,7 @@ BuildRequires: python-rpm-macros #!BuildIgnore: python-extras BuildArch: noarch # Test requirements: -%if %{with tests} +%if %{with test} BuildRequires: %{python_module testtools} %endif %python_subpackages @@ -51,18 +57,22 @@ general use outside of a testing context. %python_build %install +%if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif -%if %{with tests} +%if %{with test} %check %python_exec -m unittest discover %endif +%if !%{with test} %files %{python_files} %license LICENSE %doc NEWS README.rst %{python_sitelib}/extras %{python_sitelib}/extras-%{version}-py%{python_version}.egg-info/ +%endif %changelog