]> git.pld-linux.org Git - packages/python-waitress.git/blob - python-waitress.spec
42747d2cfb807b5fd769be40e1845837ebd958c7
[packages/python-waitress.git] / python-waitress.spec
1 #
2 # Conditional build:
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
7
8 %define         module  waitress
9 Summary:        Waitress WSGI server
10 Summary(pl.UTF-8):      Serwer WSGI Waitress
11 Name:           python-%{module}
12 Version:        1.1.0
13 Release:        3
14 License:        ZPL v2.1
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/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-modules >= 1:3.3
26 BuildRequires:  python3-setuptools
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.714
30 %if %{with doc}
31 BuildRequires:  sphinx-pdg-3
32 BuildRequires:  python3-pylons-sphinx-themes >= 0.3
33 %endif
34 Requires:       python-modules >= 1:2.7
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 Waitress is meant to be a production-quality pure-Python WSGI server
40 with very acceptable performance.
41
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.
45
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
51
52 %description -n python3-%{module}
53 Waitress is meant to be a production-quality pure-Python WSGI server
54 with very acceptable performance.
55
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.
59
60 %package apidocs
61 Summary:        API documentation for Python waitress module
62 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona waitress
63 Group:          Documentation
64
65 %description apidocs
66 API documentation for Python waitress module.
67
68 %description apidocs -l pl.UTF-8
69 Dokumentacja API modułu Pythona waitress.
70
71 %prep
72 %setup -q -n %{module}-%{version}
73
74 # gives tcp connect errors
75 %{__mv} %{module}/tests/test_functional.py{,.disable}
76
77 %build
78 %if %{with python2}
79 %py_build %{?with_tests:test}
80 %endif
81
82 %if %{with python3}
83 %py3_build %{?with_tests:test}
84 %endif
85
86 %if %{with doc}
87 PYTHONPATH=$(pwd) \
88 %{__make} -C docs html \
89         SPHINXBUILD=sphinx-build-3
90 %endif
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94
95 %if %{with python2}
96 %py_install
97
98 %{__mv} $RPM_BUILD_ROOT%{_bindir}/waitress-serve{,-2}
99
100 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/tests
101 %py_postclean
102 %endif
103
104 %if %{with python3}
105 %py3_install
106
107 %{__mv} $RPM_BUILD_ROOT%{_bindir}/waitress-serve{,-3}
108
109 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/tests
110 %endif
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %if %{with python2}
116 %files
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
122 %endif
123
124 %if %{with python3}
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
131 %endif
132
133 %if %{with doc}
134 %files apidocs
135 %defattr(644,root,root,755)
136 %doc docs/_build/html/{_static,*.html,*.js}
137 %endif
This page took 0.053851 seconds and 2 git commands to generate.