3 %bcond_without doc # Sphinx documentation
4 %bcond_without tests # test action
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module werkzeug
9 Summary: The Swiss Army knife of Python web development
10 Summary(pl.UTF-8): Scyzoryk szwajcarski programisty aplikacji WWW
11 Name: python-%{module}
15 Group: Development/Languages/Python
16 # pypi release misses docs/_themes directory
17 ##Source0Download: https://pypi.python.org/simple/Werkzeug
18 #Source0: https://files.pythonhosted.org/packages/source/W/Werkzeug/Werkzeug-%{version}.tar.gz
19 #Source0Download: https://github.com/pallets/werkzeug/releases
20 Source0: https://github.com/pallets/werkzeug/archive/%{version}/werkzeug-%{version}.tar.gz
21 # Source0-md5: 31e05a3d8e8e64e06b96c1c6a1a559ee
22 URL: https://werkzeug.palletsprojects.com/
24 BuildRequires: python-devel >= 1:2.7
25 BuildRequires: python-modules >= 1:2.7
26 BuildRequires: python-setuptools
28 BuildRequires: python-cryptography
29 BuildRequires: python-greenlet
30 BuildRequires: python-pyOpenSSL
31 BuildRequires: python-pytest
32 BuildRequires: python-pytest-timeout
34 #BuildRequires: python-pytest-xprocess
35 BuildRequires: python-requests
36 BuildRequires: python-requests-mock
38 #BuildRequires: python-watchdog
42 BuildRequires: python3-devel >= 1:3.5
43 BuildRequires: python3-modules >= 1:3.5
44 BuildRequires: python3-setuptools
46 BuildRequires: python3-cryptography
47 BuildRequires: python3-greenlet
48 BuildRequires: python3-pyOpenSSL
49 BuildRequires: python3-pytest
50 BuildRequires: python3-pytest-timeout
52 #BuildRequires: python3-pytest-xprocess
53 BuildRequires: python3-requests
55 #BuildRequires: python3-watchdog
58 BuildRequires: rpm-pythonprov
59 BuildRequires: rpmbuild(macros) >= 1.714
61 BuildRequires: python3-pallets-sphinx-themes
62 BuildRequires: python3-sphinx_issues
63 BuildRequires: python3-sphinxcontrib-log-cabinet
64 BuildRequires: sphinx-pdg-3
66 Requires: python-modules >= 1:2.7
68 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71 Werkzeug started as simple collection of various utilities for WSGI
72 applications and has become one of the most advanced WSGI utility
73 modules. It includes a powerful debugger, full featured request and
74 response objects, HTTP utilities to handle entity tags, cache control
75 headers, HTTP dates, cookie handling, file uploads, a powerful URL
76 routing system and a bunch of community contributed addon modules.
78 %description -l pl.UTF-8
79 Werkzeug początkowo był prostym zbiorem różnych narzędzi dla aplikacji
80 WSGI, a stał się jednym z najbardziej zaawansowanych modułów
81 narzędziowych WSGI. Zawiera potężny debugger, obiekty żądania i
82 odpowiedzi z pełną funkcjonalnością, narzędzia HTTP do obsługi
83 znaczników encji, nagłówki sterujące buforowaniem, daty HTTP, obsługę
84 ciasteczek, przesyłanie plików, potężny system trasowania URL oraz
85 wiele dodatkowych modułów udostępnionych przez społeczność.
87 %package -n python3-%{module}
88 Summary: The Swiss Army knife of Python web development
89 Summary(pl.UTF-8): Scyzoryk szwajcarski programisty aplikacji WWW
90 Group: Libraries/Python
91 Requires: python3-modules >= 1:3.5
93 %description -n python3-%{module}
94 Werkzeug started as simple collection of various utilities for WSGI
95 applications and has become one of the most advanced WSGI utility
96 modules. It includes a powerful debugger, full featured request and
97 response objects, HTTP utilities to handle entity tags, cache control
98 headers, HTTP dates, cookie handling, file uploads, a powerful URL
99 routing system and a bunch of community contributed addon modules.
101 %description -n python3-%{module} -l pl.UTF-8
102 Werkzeug początkowo był prostym zbiorem różnych narzędzi dla aplikacji
103 WSGI, a stał się jednym z najbardziej zaawansowanych modułów
104 narzędziowych WSGI. Zawiera potężny debugger, obiekty żądania i
105 odpowiedzi z pełną funkcjonalnością, narzędzia HTTP do obsługi
106 znaczników encji, nagłówki sterujące buforowaniem, daty HTTP, obsługę
107 ciasteczek, przesyłanie plików, potężny system trasowania URL oraz
108 wiele dodatkowych modułów udostępnionych przez społeczność.
111 Summary: Documentation for Python Werkzeug package
112 Summary(pl.UTF-8): Dokumentacja do pakietu Pythona Werkzeug
116 Documentation for Python Werkzeug package.
118 %description apidocs -l pl.UTF-8
119 Dokumentacja do pakietu Pythona Werkzeug.
122 %setup -q -n werkzeug-%{version}
129 # requests_mock.contrib._pytest_plugin helps to workaround crash on cryptography deprecation warning(?)
131 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
132 PYTEST_PLUGINS=pytest_timeout,requests_mock.contrib._pytest_plugin \
133 PYTHONPATH=$(pwd)/src \
134 %{__python} -m pytest tests
143 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
144 PYTEST_PLUGINS=pytest_timeout \
145 PYTHONPATH=$(pwd)/src \
146 %{__python3} -m pytest tests
151 PYTHONPATH=$(pwd)/src \
152 %{__make} -C docs html \
153 SPHINXBUILD=sphinx-build-3
157 rm -rf $RPM_BUILD_ROOT
162 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
163 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
164 find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -name '*.py' \
165 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
171 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
172 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
173 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
174 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
178 rm -rf $RPM_BUILD_ROOT
182 %defattr(644,root,root,755)
183 %doc CHANGES.rst LICENSE.rst README.rst
184 %{py_sitescriptdir}/werkzeug
185 %{py_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
186 %{_examplesdir}/python-%{module}-%{version}
190 %files -n python3-%{module}
191 %defattr(644,root,root,755)
192 %doc CHANGES.rst LICENSE.rst README.rst
193 %{py3_sitescriptdir}/werkzeug
194 %{py3_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
195 %{_examplesdir}/python3-%{module}-%{version}
200 %defattr(644,root,root,755)
201 %doc docs/_build/html/{_images,_static,deployment,middleware,*.html,*.js}