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