]> git.pld-linux.org Git - packages/python3-gunicorn.git/blame - python-gunicorn.spec
- updated to 19.10.0
[packages/python3-gunicorn.git] / python-gunicorn.spec
CommitLineData
d556a27f
ER
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
872f837a 5%bcond_without tests # unit tests
d556a27f
ER
6
7%define module gunicorn
8Summary: Python WSGI application server
872f837a 9Summary(pl.UTF-8): Pythonowy serwer aplikacji WSGI
d556a27f 10Name: python-%{module}
789c1f12
JB
11# keep 19.x here for python2 support
12Version: 19.10.0
cd6129a1 13Release: 1
d556a27f
ER
14License: MIT
15Group: Daemons
872f837a
JB
16#Source0Download: https://pypi.python.org/simple/gunicorn
17Source0: https://files.pythonhosted.org/packages/source/g/gunicorn/%{module}-%{version}.tar.gz
789c1f12 18# Source0-md5: dfa07409c60f9dd8501fa0503f0bfbb1
d556a27f
ER
19# distro-specific, not upstreamable
20Patch100: %{name}-dev-log.patch
872f837a 21URL: http://gunicorn.org/
d556a27f 22%if %{with python2}
872f837a 23BuildRequires: python-devel >= 1:2.6
d556a27f 24BuildRequires: python-setuptools
872f837a 25%if %{with tests}
789c1f12 26BuildRequires: python-coverage >= 4.0
872f837a 27BuildRequires: python-mock
789c1f12
JB
28BuildRequires: python-pytest >= 3.2.5
29BuildRequires: python-pytest-cov >= 2.5.1
872f837a
JB
30%if "%{py_ver}" < "2.7"
31BuildRequires: python-unittest2
32%endif
33%endif
d556a27f
ER
34%endif
35%if %{with python3}
872f837a 36BuildRequires: python3-devel >= 1:3.2
d556a27f 37BuildRequires: python3-setuptools
872f837a 38%if %{with tests}
789c1f12
JB
39BuildRequires: python3-coverage >= 4.0
40BuildRequires: python3-pytest >= 3.2.5
41BuildRequires: python3-pytest-cov >= 2.5.1
872f837a 42%if "%{py3_ver}" < "3.3"
789c1f12 43BuildRequires: python3-mock
872f837a
JB
44%endif
45%endif
d556a27f 46%endif
872f837a
JB
47BuildRequires: rpm-pythonprov
48BuildRequires: rpmbuild(macros) >= 1.714
49BuildRequires: sed >= 4.0
50%if %{with doc}
51BuildRequires: sphinx-pdg
52BuildRequires: python3-sphinx_rtd_theme
53%endif
54Requires: python-setuptools
d556a27f
ER
55BuildArch: noarch
56BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58%description
59Gunicorn ("Green Unicorn") is a Python WSGI HTTP server for UNIX. It
60uses the pre-fork worker model, ported from Ruby's Unicorn project. It
61supports WSGI, Django, and Paster applications.
62
872f837a
JB
63%description -l pl.UTF-8
64Gunicorn ("Green Unicorn" - zielony jednorożec) to pythonowy serwer
65HTTP WSGI dla systemów uniksowych. Wykorzystuje model pre-fork,
66przeniesiony z projektu Unicorn napisanego w języku Ruby. Obsługuje
67aplikacje WSGI, Django i Paster.
68
d556a27f
ER
69%package -n python3-%{module}
70Summary: Python WSGI application server
872f837a 71Summary(pl.UTF-8): Pythonowy serwer aplikacji WSGI
d556a27f
ER
72Group: Libraries/Python
73Requires: python3-setuptools
74
75%description -n python3-%{module}
76Gunicorn ("Green Unicorn") is a Python WSGI HTTP server for UNIX. It
77uses the pre-fork worker model, ported from Ruby's Unicorn project. It
78supports WSGI, Django, and Paster applications.
79
872f837a
JB
80%description -n python3-%{module} -l pl.UTF-8
81Gunicorn ("Green Unicorn" - zielony jednorożec) to pythonowy serwer
82HTTP WSGI dla systemów uniksowych. Wykorzystuje model pre-fork,
83przeniesiony z projektu Unicorn napisanego w języku Ruby. Obsługuje
84aplikacje WSGI, Django i Paster.
85
d556a27f 86%prep
872f837a 87%setup -q -n %{module}-%{version}
d556a27f 88%patch100 -p1
d556a27f 89
789c1f12 90%{__sed} -i -e 's/==/>=/; s/,<4\.4//' requirements_test.txt
d556a27f
ER
91
92%build
789c1f12
JB
93export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTEST_PLUGINS="pytest_cov.plugin"
94
d556a27f 95%if %{with python2}
872f837a 96%py_build %{?with_tests:test}
d556a27f
ER
97%endif
98
99%if %{with python3}
872f837a 100%py3_build %{?with_tests:test}
d556a27f
ER
101%endif
102
103%install
104rm -rf $RPM_BUILD_ROOT
872f837a 105
d556a27f 106%if %{with python3}
862d8f84 107%py3_install
d556a27f
ER
108
109# rename executables in %{_bindir} so they don't collide
872f837a
JB
110for executable in gunicorn gunicorn_paster; do
111 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{,python3-}$executable
d556a27f 112done
d556a27f
ER
113%endif
114
115%if %{with python2}
862d8f84 116%py_install
d556a27f
ER
117%endif
118
119%clean
120rm -rf $RPM_BUILD_ROOT
121
122%if %{with python2}
123%files
124%defattr(644,root,root,755)
872f837a
JB
125%doc LICENSE NOTICE README.rst THANKS
126%attr(755,root,root) %{_bindir}/gunicorn
127%attr(755,root,root) %{_bindir}/gunicorn_paster
d556a27f 128%{py_sitescriptdir}/gunicorn
504b28ff 129%{py_sitescriptdir}/gunicorn-%{version}-py*.egg-info
d556a27f
ER
130%endif
131
132%if %{with python3}
133%files -n python3-%{module}
134%defattr(644,root,root,755)
872f837a
JB
135%doc LICENSE NOTICE README.rst THANKS
136%attr(755,root,root) %{_bindir}/python3-gunicorn
137%attr(755,root,root) %{_bindir}/python3-gunicorn_paster
d556a27f
ER
138%{py3_sitescriptdir}/gunicorn
139%{py3_sitescriptdir}/gunicorn-%{version}-py*.egg-info
140%endif
This page took 0.122802 seconds and 4 git commands to generate.