]> git.pld-linux.org Git - packages/python-gunicorn.git/blame - python-gunicorn.spec
- python 3.5 rebuild
[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
5
6%define module gunicorn
7Summary: Python WSGI application server
8Name: python-%{module}
1998dbc3 9Version: 19.3.0
92ef5e9d 10Release: 2
d556a27f
ER
11License: MIT
12Group: Daemons
13URL: http://gunicorn.org/
1998dbc3
MK
14Source0: https://pypi.python.org/packages/source/g/%{module}/%{module}-%{version}.tar.gz
15# Source0-md5: faa3e80661efd67e5e06bba32699af20
d556a27f
ER
16# distro-specific, not upstreamable
17Patch100: %{name}-dev-log.patch
18Requires: python-setuptools
19%if %{with python2}
20BuildRequires: python-devel
21BuildRequires: python-setuptools
22%endif
23%if %{with python3}
24BuildRequires: python3-devel
25BuildRequires: python3-setuptools
26%endif
27BuildArch: noarch
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31Gunicorn ("Green Unicorn") is a Python WSGI HTTP server for UNIX. It
32uses the pre-fork worker model, ported from Ruby's Unicorn project. It
33supports WSGI, Django, and Paster applications.
34
35%package -n python3-%{module}
36Summary: Python WSGI application server
37Group: Libraries/Python
38Requires: python3-setuptools
39
40%description -n python3-%{module}
41Gunicorn ("Green Unicorn") is a Python WSGI HTTP server for UNIX. It
42uses the pre-fork worker model, ported from Ruby's Unicorn project. It
43supports WSGI, Django, and Paster applications.
44
45%prep
46%setup -qc
47mv %{module}-%{version} py2
48cd py2
49%patch100 -p1
50cd -
51
52%if %{with python3}
53cp -a py2 py3
54%endif
55
56%build
57%if %{with python2}
58cd py2
59%{__python} setup.py build
60cd -
61%endif
62
63%if %{with python3}
64cd py3
65%{__python3} setup.py build
66%endif
67
68%if %{with tests}
69cd py2
70%{__python} setup.py test
71cd -
72
73%if %{with python3}
74cd py3
75%{__python3} setup.py test
76%endif
77%endif
78
79%install
80rm -rf $RPM_BUILD_ROOT
81%if %{with python3}
82cd py3
83%{__python3} setup.py install \
84 --skip-build \
85 --optimize=2 \
86 --root=$RPM_BUILD_ROOT
87
88# rename executables in %{_bindir} so they don't collide
89for executable in %{module} %{module}_django %{module}_paster; do
90 mv $RPM_BUILD_ROOT%{_bindir}/{,python3-}$executable
91done
92cd -
93%endif
94
95%if %{with python2}
96cd py2
97%{__python} setup.py install \
98 --skip-build \
99 --optimize=2 \
100 --root=$RPM_BUILD_ROOT
101%endif
102
103%clean
104rm -rf $RPM_BUILD_ROOT
105
106%if %{with python2}
107%files
108%defattr(644,root,root,755)
109%doc py2/{LICENSE,NOTICE,README.rst,THANKS}
110%attr(755,root,root) %{_bindir}/%{module}
111%attr(755,root,root) %{_bindir}/%{module}_django
112%attr(755,root,root) %{_bindir}/%{module}_paster
113%{py_sitescriptdir}/gunicorn
504b28ff 114%{py_sitescriptdir}/gunicorn-%{version}-py*.egg-info
d556a27f
ER
115%endif
116
117%if %{with python3}
118%files -n python3-%{module}
119%defattr(644,root,root,755)
120%doc py3/{LICENSE,NOTICE,README.rst,THANKS}
121%attr(755,root,root) %{_bindir}/python3-%{module}
122%attr(755,root,root) %{_bindir}/python3-%{module}_django
123%attr(755,root,root) %{_bindir}/python3-%{module}_paster
124%{py3_sitescriptdir}/gunicorn
125%{py3_sitescriptdir}/gunicorn-%{version}-py*.egg-info
126%endif
This page took 0.065242 seconds and 4 git commands to generate.