[packages/python-gunicorn] - updated to 19.7.0; builds in a sane way now

qboosh qboosh at pld-linux.org
Fri Mar 17 22:51:33 CET 2017


commit 872f837aee417922475e49f05ea36622a8248156
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Mar 17 22:53:46 2017 +0100

    - updated to 19.7.0; builds in a sane way now

 python-gunicorn.spec | 104 +++++++++++++++++++++++++++++----------------------
 1 file changed, 59 insertions(+), 45 deletions(-)
---
diff --git a/python-gunicorn.spec b/python-gunicorn.spec
index e87c1bb..8f5027e 100644
--- a/python-gunicorn.spec
+++ b/python-gunicorn.spec
@@ -2,29 +2,53 @@
 # Conditional build:
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
+%bcond_without	tests	# unit tests
 
 %define	module gunicorn
 Summary:	Python WSGI application server
+Summary(pl.UTF-8):	Pythonowy serwer aplikacji WSGI
 Name:		python-%{module}
-Version:	19.3.0
-Release:	5
+Version:	19.7.0
+Release:	1
 License:	MIT
 Group:		Daemons
-URL:		http://gunicorn.org/
-BuildRequires:	rpmbuild(macros) >= 1.710
-Source0:	https://pypi.python.org/packages/source/g/%{module}/%{module}-%{version}.tar.gz
-# Source0-md5:	faa3e80661efd67e5e06bba32699af20
+#Source0Download: https://pypi.python.org/simple/gunicorn
+Source0:	https://files.pythonhosted.org/packages/source/g/gunicorn/%{module}-%{version}.tar.gz
+# Source0-md5:	1a0eef597a5bd55f24086b2597111c94
 # distro-specific, not upstreamable
 Patch100:	%{name}-dev-log.patch
-Requires:	python-setuptools
+URL:		http://gunicorn.org/
 %if %{with python2}
-BuildRequires:	python-devel
+BuildRequires:	python-devel >= 1:2.6
 BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-mock
+BuildRequires:	python-pytest >= 3.0.5
+BuildRequires:	python-pytest-cov >= 2.4.0
+%if "%{py_ver}" < "2.7"
+BuildRequires:	python-unittest2
+%endif
+%endif
 %endif
 %if %{with python3}
-BuildRequires:	python3-devel
+BuildRequires:	python3-devel >= 1:3.2
 BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python3-pytest >= 3.0.5
+BuildRequires:	python3-pytest-cov >= 2.4.0
+%if "%{py3_ver}" < "3.3"
+BuildRequires:	python-mock
+%endif
+%endif
 %endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+BuildRequires:	sed >= 4.0
+%if %{with doc}
+BuildRequires:	sphinx-pdg
+BuildRequires:	python3-sphinx_rtd_theme
+%endif
+Requires:	python-setuptools
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -33,8 +57,15 @@ 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.
 
+%description -l pl.UTF-8
+Gunicorn ("Green Unicorn" - zielony jednorożec) to pythonowy serwer
+HTTP WSGI dla systemów uniksowych. Wykorzystuje model pre-fork,
+przeniesiony z projektu Unicorn napisanego w języku Ruby. Obsługuje
+aplikacje WSGI, Django i Paster.
+
 %package -n python3-%{module}
 Summary:	Python WSGI application server
+Summary(pl.UTF-8):	Pythonowy serwer aplikacji WSGI
 Group:		Libraries/Python
 Requires:	python3-setuptools
 
@@ -43,55 +74,40 @@ 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.
 
+%description -n python3-%{module} -l pl.UTF-8
+Gunicorn ("Green Unicorn" - zielony jednorożec) to pythonowy serwer
+HTTP WSGI dla systemów uniksowych. Wykorzystuje model pre-fork,
+przeniesiony z projektu Unicorn napisanego w języku Ruby. Obsługuje
+aplikacje WSGI, Django i Paster.
+
 %prep
-%setup -qc
-mv %{module}-%{version} py2
-cd py2
+%setup -q -n %{module}-%{version}
 %patch100 -p1
-cd -
 
-%if %{with python3}
-cp -a py2 py3
-%endif
+%{__sed} -i -e 's/==/>=/' requirements_test.txt
 
 %build
 %if %{with python2}
-cd py2
-%py_build
-cd -
+%py_build %{?with_tests:test}
 %endif
 
 %if %{with python3}
-cd py3
-%py3_build
-%endif
-
-%if %{with tests}
-cd py2
-%{__python} setup.py test
-cd -
-
-%if %{with python3}
-cd py3
-%{__python3} setup.py test
-%endif
+%py3_build %{?with_tests:test}
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %if %{with python3}
-cd py3
 %py3_install
 
 # rename executables in %{_bindir} so they don't collide
-for executable in %{module} %{module}_django %{module}_paster; do
-	mv $RPM_BUILD_ROOT%{_bindir}/{,python3-}$executable
+for executable in gunicorn gunicorn_paster; do
+	%{__mv} $RPM_BUILD_ROOT%{_bindir}/{,python3-}$executable
 done
-cd -
 %endif
 
 %if %{with python2}
-cd py2
 %py_install
 %endif
 
@@ -101,10 +117,9 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc py2/{LICENSE,NOTICE,README.rst,THANKS}
-%attr(755,root,root) %{_bindir}/%{module}
-%attr(755,root,root) %{_bindir}/%{module}_django
-%attr(755,root,root) %{_bindir}/%{module}_paster
+%doc LICENSE NOTICE README.rst THANKS
+%attr(755,root,root) %{_bindir}/gunicorn
+%attr(755,root,root) %{_bindir}/gunicorn_paster
 %{py_sitescriptdir}/gunicorn
 %{py_sitescriptdir}/gunicorn-%{version}-py*.egg-info
 %endif
@@ -112,10 +127,9 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%doc py3/{LICENSE,NOTICE,README.rst,THANKS}
-%attr(755,root,root) %{_bindir}/python3-%{module}
-%attr(755,root,root) %{_bindir}/python3-%{module}_django
-%attr(755,root,root) %{_bindir}/python3-%{module}_paster
+%doc LICENSE NOTICE README.rst THANKS
+%attr(755,root,root) %{_bindir}/python3-gunicorn
+%attr(755,root,root) %{_bindir}/python3-gunicorn_paster
 %{py3_sitescriptdir}/gunicorn
 %{py3_sitescriptdir}/gunicorn-%{version}-py*.egg-info
 %endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-gunicorn.git/commitdiff/872f837aee417922475e49f05ea36622a8248156



More information about the pld-cvs-commit mailing list