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