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