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-zipp.changes b/python-zipp.changes index b11c9e9..a9da93c 100644 --- a/python-zipp.changes +++ b/python-zipp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jun 6 15:51:59 UTC 2019 - Tomáš Chvátal + +- Switch to mulitbuild to avoid build cycle + ------------------------------------------------------------------- Thu May 16 20:56:11 UTC 2019 - ranand@suse.com diff --git a/python-zipp.spec b/python-zipp.spec index 6d77f5d..0fc7cfc 100644 --- a/python-zipp.spec +++ b/python-zipp.spec @@ -12,20 +12,27 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: python-zipp +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-zipp%{psuffix} Version: 0.5.1 Release: 0 Summary: Pathlib-compatible object wrapper for zip files License: MIT Group: Development/Languages/Python -Url: https://github.com/jaraco/zipp +URL: https://github.com/jaraco/zipp Source: https://files.pythonhosted.org/packages/source/z/zipp/zipp-%{version}.tar.gz -BuildRequires: %{python_module pytest >= 3.5} BuildRequires: %{python_module setuptools_scm >= 1.15.0} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -33,7 +40,9 @@ BuildRequires: python-contextlib2 BuildRequires: python-rpm-macros BuildRequires: python-unittest2 BuildArch: noarch - +%if %{with test} +BuildRequires: %{python_module pytest >= 3.5} +%endif %python_subpackages %description @@ -48,15 +57,21 @@ rm -f pytest.ini %python_build %install +%if !%{with test} %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif +%if %{with test} %check -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} +%pytest +%endif +%if !%{with test} %files %{python_files} %doc README.rst %license LICENSE %{python_sitelib}/* +%endif %changelog