- Switch to multibuild to avoid cycle bsc#1138666

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-py?expand=0&rev=14
This commit is contained in:
Tomáš Chvátal 2019-06-19 10:09:47 +00:00 committed by Git OBS Bridge
parent 7cc7715a9a
commit 044a6ef27a
3 changed files with 27 additions and 3 deletions

3
_multibuild Normal file
View File

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

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jun 19 10:08:47 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Switch to multibuild to avoid cycle bsc#1138666
-------------------------------------------------------------------
Wed Feb 27 13:48:08 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>

View File

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