Accepting request 708170 from devel:languages:python

- Switch to mulitbuild to avoid build cycle

OBS-URL: https://build.opensuse.org/request/show/708170
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-zipp?expand=0&rev=5
This commit is contained in:
Dominique Leuenberger 2019-06-13 20:38:01 +00:00 committed by Git OBS Bridge
commit 51392cb5d1
3 changed files with 29 additions and 6 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jun 6 15:51:59 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Switch to mulitbuild to avoid build cycle
-------------------------------------------------------------------
Thu May 16 20:56:11 UTC 2019 - ranand@suse.com

View File

@ -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