3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_without doc # Sphinx documentation
6 %bcond_without tests # unit tests
8 %define module waitress
9 Summary: Waitress WSGI server
10 Summary(pl.UTF-8): Serwer WSGI Waitress
11 Name: python-%{module}
15 Group: Libraries/Python
16 #Source0Download: https://pypi.org/simple/waitress/
17 Source0: https://files.pythonhosted.org/packages/source/w/waitress/%{module}-%{version}.tar.gz
18 # Source0-md5: 0f1eb7fdfdbf2e6d18decbda1733045c
19 URL: https://docs.pylonsproject.org/projects/waitress/
21 BuildRequires: python-modules >= 1:2.7
22 BuildRequires: python-setuptools
25 BuildRequires: python3-modules >= 1:3.3
26 BuildRequires: python3-setuptools
28 BuildRequires: rpm-pythonprov
29 BuildRequires: rpmbuild(macros) >= 1.714
31 BuildRequires: sphinx-pdg-3
32 BuildRequires: python3-pylons-sphinx-themes >= 0.3
34 Requires: python-modules >= 1:2.7
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 Waitress is meant to be a production-quality pure-Python WSGI server
40 with very acceptable performance.
42 %description -l pl.UTF-8
43 Waitress jest serwerem WSGI tworzonym w czystym Pythonie, z myślą o
44 produkcyjnej jakości i akceptowalnej wydajności.
46 %package -n python3-%{module}
47 Summary: Waitress WSGI server
48 Summary(pl.UTF-8): Serwer WSGI Waitress
49 Group: Libraries/Python
50 Requires: python3-modules >= 1:3.3
52 %description -n python3-%{module}
53 Waitress is meant to be a production-quality pure-Python WSGI server
54 with very acceptable performance.
56 %description -n python3-%{module} -l pl.UTF-8
57 Waitress jest serwerem WSGI tworzonym w czystym Pythonie, z myślą o
58 produkcyjnej jakości i akceptowalnej wydajności.
61 Summary: API documentation for Python waitress module
62 Summary(pl.UTF-8): Dokumentacja API modułu Pythona waitress
66 API documentation for Python waitress module.
68 %description apidocs -l pl.UTF-8
69 Dokumentacja API modułu Pythona waitress.
72 %setup -q -n %{module}-%{version}
74 # gives tcp connect errors
75 %{__mv} %{module}/tests/test_functional.py{,.disable}
79 %py_build %{?with_tests:test}
83 %py3_build %{?with_tests:test}
88 %{__make} -C docs html \
89 SPHINXBUILD=sphinx-build-3
93 rm -rf $RPM_BUILD_ROOT
98 %{__mv} $RPM_BUILD_ROOT%{_bindir}/waitress-serve{,-2}
100 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/tests
107 %{__mv} $RPM_BUILD_ROOT%{_bindir}/waitress-serve{,-3}
109 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/tests
113 rm -rf $RPM_BUILD_ROOT
117 %defattr(644,root,root,755)
118 %doc CHANGES.txt COPYRIGHT.txt HISTORY.txt LICENSE.txt README.rst TODO.txt
119 %attr(755,root,root) %{_bindir}/waitress-serve-2
120 %{py_sitescriptdir}/waitress
121 %{py_sitescriptdir}/waitress-%{version}-py*.egg-info
125 %files -n python3-%{module}
126 %defattr(644,root,root,755)
127 %doc CHANGES.txt COPYRIGHT.txt HISTORY.txt LICENSE.txt README.rst TODO.txt
128 %attr(755,root,root) %{_bindir}/waitress-serve-3
129 %{py3_sitescriptdir}/waitress
130 %{py3_sitescriptdir}/waitress-%{version}-py*.egg-info
135 %defattr(644,root,root,755)
136 %doc docs/_build/html/{_static,*.html,*.js}