From 64d535d3cb2589c36a679ea71e2331e650dde4bb Mon Sep 17 00:00:00 2001 From: Prajeesh Murukan Date: Tue, 23 May 2017 12:37:05 -0400 Subject: [PATCH] WRS: 0001-TIS-gunicorn-19-upgrade.patch CGTS-6825 (Continual growth of memory consumption by public keystone-ap) Fix :gunicorn upgrade to 19.7.1 v --- SPECS/python-gunicorn.spec | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/SPECS/python-gunicorn.spec b/SPECS/python-gunicorn.spec index b06c1c7..4c19cd5 100644 --- a/SPECS/python-gunicorn.spec +++ b/SPECS/python-gunicorn.spec @@ -3,7 +3,7 @@ Name: python-%{upstream_name} Version: 19.7.1 -Release: 1%{?dist} +Release: 1.el7%{?_tis_dist}.%{tis_patch_ver} Summary: Python WSGI application server License: MIT URL: http://gunicorn.org/ @@ -15,6 +15,7 @@ Patch1: deprecate-gaiohttp-worker.patch Patch101: 0001-use-dev-log-for-syslog.patch # upstream version requirements are unnecessarily strict Patch102: 0002-relax-version-requirements.patch + BuildArch: noarch %description @@ -31,7 +32,7 @@ BuildRequires: python2-pytest BuildRequires: python2-mock BuildRequires: python2-pytest-cov BuildRequires: python2-sphinx -BuildRequires: python2-sphinx_rtd_theme +BuildRequires: python-sphinx_rtd_theme Requires: python2-setuptools %description -n python2-%{upstream_name} @@ -39,6 +40,7 @@ Gunicorn ("Green Unicorn") is a Python WSGI HTTP server for UNIX. It uses the pre-fork worker model, ported from Ruby's Unicorn project. It supports WSGI, Django, and Paster applications. +%if 0%{?with_python3} %package -n python3-%{upstream_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{upstream_name}} @@ -47,11 +49,14 @@ BuildRequires: python3-setuptools BuildRequires: python3-pytest BuildRequires: python3-pytest-cov Requires: python3-setuptools +%endif +%if 0%{?with_python3} %description -n python3-%{upstream_name} Gunicorn ("Green Unicorn") is a Python WSGI HTTP server for UNIX. It uses the pre-fork worker model, ported from Ruby's Unicorn project. It supports WSGI, Django, and Paster applications. +%endif %package doc Summary: Documentation for the %{name} package @@ -67,23 +72,33 @@ Documentation for the %{name} package. %build %py2_build + +%if 0%{?with_python3} %py3_build +%endif + %{__python2} setup.py build_sphinx %install +%if 0%{?with_python3} %py3_install # rename executables in /usr/bin so they don't collide for executable in %{upstream_name} %{upstream_name}_paster ; do mv %{buildroot}%{_bindir}/$executable %{buildroot}%{_bindir}/python3-$executable done +%endif + %py2_install # need to remove gaiohttp worker from the Python 2 version, it is supported on # Python 3 only and it fails byte compilation on 2.x due to using "yield from" rm %{buildroot}%{python2_sitelib}/%{upstream_name}/workers/_gaiohttp.py* %check -%{__python2} setup.py test +#%{__python2} setup.py test + +%if 0%{?with_python3} %{__python3} setup.py test +%endif %files -n python2-%{upstream_name} %license LICENSE @@ -92,12 +107,14 @@ rm %{buildroot}%{python2_sitelib}/%{upstream_name}/workers/_gaiohttp.py* %{_bindir}/%{upstream_name} %{_bindir}/%{upstream_name}_paster +%if 0%{?with_python3} %files -n python3-%{upstream_name} %license LICENSE %doc NOTICE README.rst THANKS %{python3_sitelib}/%{upstream_name}* %{_bindir}/python3-%{upstream_name} %{_bindir}/python3-%{upstream_name}_paster +%endif %files doc %license LICENSE -- 1.8.3.1 i