3 %bcond_without tests # unit tests
5 %define module gunicorn
6 Summary: Python WSGI application server
7 Summary(pl.UTF-8): Pythonowy serwer aplikacji WSGI
8 Name: python3-%{module}
13 #Source0Download: https://pypi.python.org/simple/gunicorn
14 Source0: https://files.pythonhosted.org/packages/source/g/gunicorn/%{module}-%{version}.tar.gz
15 # Source0-md5: db8a7c5c2064000af70286534803bf1d
16 Patch0: gunicorn-eventlet0.30.patch
17 # distro-specific, not upstreamable
18 Patch100: %{name}-dev-log.patch
19 URL: https://gunicorn.org/
20 BuildRequires: python3-devel >= 1:3.5
21 BuildRequires: python3-setuptools >= 1:3.0
23 BuildRequires: python3-aiohttp
24 BuildRequires: python3-coverage >= 4.0
25 BuildRequires: python3-eventlet >= 0.24.1
26 BuildRequires: python3-gevent >= 1.4.0
27 BuildRequires: python3-pytest >= 3.2.5
28 BuildRequires: python3-pytest-cov >= 2.5.1
30 BuildRequires: rpm-pythonprov
31 BuildRequires: rpmbuild(macros) >= 1.714
32 BuildRequires: sed >= 4.0
34 BuildRequires: sphinx-pdg-3
35 BuildRequires: python3-sphinx_rtd_theme
37 Requires: python3-setuptools
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 Gunicorn ("Green Unicorn") is a Python WSGI HTTP server for UNIX. It
43 uses the pre-fork worker model, ported from Ruby's Unicorn project. It
44 supports WSGI, Django, and Paster applications.
46 %description -l pl.UTF-8
47 Gunicorn ("Green Unicorn" - zielony jednorożec) to pythonowy serwer
48 HTTP WSGI dla systemów uniksowych. Wykorzystuje model pre-fork,
49 przeniesiony z projektu Unicorn napisanego w języku Ruby. Obsługuje
50 aplikacje WSGI, Django i Paster.
53 %setup -q -n %{module}-%{version}
58 export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTEST_PLUGINS="pytest_cov.plugin"
60 %py3_build %{?with_tests:test}
63 rm -rf $RPM_BUILD_ROOT
67 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{gunicorn,gunicorn-3}
70 rm -rf $RPM_BUILD_ROOT
73 %defattr(644,root,root,755)
74 %doc LICENSE NOTICE README.rst THANKS
75 %attr(755,root,root) %{_bindir}/gunicorn-3
76 %{py3_sitescriptdir}/gunicorn
77 %{py3_sitescriptdir}/gunicorn-%{version}-py*.egg-info