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-py.changes b/python-py.changes index 794d7a4..430db28 100644 --- a/python-py.changes +++ b/python-py.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 19 10:08:47 UTC 2019 - Tomáš Chvátal + +- Switch to multibuild to avoid cycle bsc#1138666 + ------------------------------------------------------------------- Wed Feb 27 13:48:08 UTC 2019 - Tomáš Chvátal diff --git a/python-py.spec b/python-py.spec index c3e47cc..725329c 100644 --- a/python-py.spec +++ b/python-py.spec @@ -18,7 +18,15 @@ %define oldpython python %{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: python-py +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-py%{psuffix} Version: 1.8.0 Release: 0 Summary: Library with cross-python path, ini-parsing, io, code, log facilities @@ -26,13 +34,15 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/pytest-dev/py Source: https://files.pythonhosted.org/packages/source/p/py/py-%{version}.tar.gz -BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Obsoletes: %{oldpython}-py-docs BuildArch: noarch +%if %{with test} +BuildRequires: %{python_module pytest} +%endif %python_subpackages %description @@ -57,19 +67,25 @@ rm -f testing/log/test_warning.py %python_build %install +%if !%{with test} %python_install %python_exec %fdupes %{buildroot}%{$python_sitelib} +%endif %check +%if %{with test} export LANG=en_US.UTF-8 # the passing is because upstream does not care about the results for now and # pinned pytest 3 in the repo (as this module is deprecated) # https://github.com/pytest-dev/py/issues/209 -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m pytest || : +%pytest || : +%endif +%if !%{with test} %files %{python_files} %doc README.rst %license LICENSE %{python_sitelib}/* +%endif %changelog