1
0

Accepting request 904227 from home:alarrosa:branches:devel:languages:python

- Add a _multibuild file to separate the tests in another build
  in order to break a cycle between: python-Django, python-aiohttp,
  python-eventlet, python-geoip2, python-gunicorn, python-paramiko,
  python-pyzmq and python-semantic_version.

OBS-URL: https://build.opensuse.org/request/show/904227
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gunicorn?expand=0&rev=50
This commit is contained in:
Markéta Machová 2021-07-07 08:43:45 +00:00 committed by Git OBS Bridge
parent d056c0c809
commit 3ce04a9bcf
3 changed files with 35 additions and 9 deletions

3
_multibuild Normal file
View File

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

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Jul 5 15:12:53 UTC 2021 - Antonio Larrosa <alarrosa@suse.com>
- Add a _multibuild file to separate the tests in another build
in order to break a cycle between: python-Django, python-aiohttp,
python-eventlet, python-geoip2, python-gunicorn, python-paramiko,
python-pyzmq and python-semantic_version.
-------------------------------------------------------------------
Tue Jun 29 08:52:40 UTC 2021 - Ondřej Súkup <mimi.vx@gmail.com>

View File

@ -1,5 +1,5 @@
#
# spec file for package python-gunicorn
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -16,9 +16,17 @@
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-gunicorn
Name: python-gunicorn%{psuffix}
Version: 20.1.0
Release: 0
Summary: WSGI HTTP Server for UNIX
@ -26,16 +34,19 @@ License: MIT
Group: Development/Languages/Python
URL: https://gunicorn.org
Source: https://files.pythonhosted.org/packages/source/g/gunicorn/gunicorn-%{version}.tar.gz
BuildRequires: %{python_module eventlet}
BuildRequires: %{python_module gevent}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools >= 3.0}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-Sphinx
%if %{with test}
BuildRequires: %{python_module eventlet}
BuildRequires: %{python_module gevent >= 1.4}
BuildRequires: %{python_module gunicorn}
BuildRequires: %{python_module pytest}
%endif
Requires: python-setuptools >= 3.0
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(postun):update-alternatives
Suggests: python-evenlet
Suggests: python-gevent
Suggests: python-gthread
@ -69,6 +80,12 @@ sed -i -e '/cover/d' requirements_test.txt
# do not check coverage
sed -i -e 's/--cov[^ ]*//' -e 's/--cov-report[^ ]*//' setup.cfg
%if %{with test}
%check
%pytest
%else # without test
%build
%python_build
sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html
@ -78,9 +95,6 @@ sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html
%python_clone -a %{buildroot}%{_bindir}/gunicorn
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%post
%python_install_alternative gunicorn
@ -95,5 +109,6 @@ sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html
%files -n python-gunicorn-doc
%license LICENSE
%doc README.rst NOTICE THANKS docs/build/html
%endif
%changelog