From ce7d00b0038c592527626544439042c85430e63fa406c990d8a69c752f7ae498 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 19 Dec 2022 10:09:00 +0000 Subject: [PATCH] - split tests into multibuild to solve cycle with pytest OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exceptiongroup?expand=0&rev=6 --- _multibuild | 3 +++ python-exceptiongroup.changes | 5 +++++ python-exceptiongroup.spec | 18 ++++++++++++++++-- 3 files changed, 24 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-exceptiongroup.changes b/python-exceptiongroup.changes index 7adff02..d0802cc 100644 --- a/python-exceptiongroup.changes +++ b/python-exceptiongroup.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Dec 19 10:08:40 UTC 2022 - Dirk Müller + +- split tests into multibuild to solve cycle with pytest + ------------------------------------------------------------------- Thu Dec 1 09:42:08 UTC 2022 - Johannes Kastl diff --git a/python-exceptiongroup.spec b/python-exceptiongroup.spec index 50acc04..75d883f 100644 --- a/python-exceptiongroup.spec +++ b/python-exceptiongroup.spec @@ -1,5 +1,5 @@ # -# spec file for package python-exceptiongroup +# spec file # # Copyright (c) 2022 SUSE LLC # @@ -16,7 +16,17 @@ # -Name: python-exceptiongroup +# This is not only because of dependency of testsuite, but mostly +# because of cyclical dependencies between exceptiongroup and pytest. +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%bcond_without test +%define psuffix -test +%else +%bcond_with test +%define psuffix %{nil} +%endif +Name: python-exceptiongroup%{psuffix} Version: 1.0.4 Release: 0 Summary: Backport of PEP 654 (exception groups) @@ -26,7 +36,9 @@ Source: https://github.com/agronholm/exceptiongroup/archive/refs/tags/%{ BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module flit-scm} BuildRequires: %{python_module pip} +%if %{with test} BuildRequires: %{python_module pytest} +%endif BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -70,8 +82,10 @@ export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%if %{with test} %check %pytest +%endif %files %{python_files} %doc README.rst