3 %bcond_without doc # Sphinx documentation
4 %bcond_with 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: e2d3061005cc442d80a118b42f8f3e11
22 URL: http://werkzeug.pocoo.org/
24 BuildRequires: python-devel >= 1:2.6
25 BuildRequires: python-modules >= 1:2.6
26 BuildRequires: python-setuptools
28 BuildRequires: python-greenlet
29 BuildRequires: python-hypothesis
31 #BuildRequires: python-memcached
32 BuildRequires: python-pyOpenSSL
33 BuildRequires: python-pytest
35 #BuildRequires: python-pytest-xprocess
37 #BuildRequires: python-redis
38 BuildRequires: python-requests
40 #BuildRequires: python-watchdog
44 BuildRequires: python3-devel >= 1:3.3
45 BuildRequires: python3-modules >= 1:3.3
46 BuildRequires: python3-setuptools
48 BuildRequires: python3-greenlet
49 BuildRequires: python3-hypothesis
51 #BuildRequires: python3-memcached
52 BuildRequires: python3-pyOpenSSL
53 BuildRequires: python3-pytest
55 #BuildRequires: python3-pytest-xprocess
57 #BuildRequires: python3-redis
58 BuildRequires: python3-requests
60 #BuildRequires: python3-watchdog
63 BuildRequires: rpm-pythonprov
64 BuildRequires: rpmbuild(macros) >= 1.714
66 BuildRequires: python3-sphinx_issues
67 BuildRequires: sphinx-pdg
69 Requires: python-modules >= 1:2.6
71 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74 Werkzeug started as simple collection of various utilities for WSGI
75 applications and has become one of the most advanced WSGI utility
76 modules. It includes a powerful debugger, full featured request and
77 response objects, HTTP utilities to handle entity tags, cache control
78 headers, HTTP dates, cookie handling, file uploads, a powerful URL
79 routing system and a bunch of community contributed addon modules.
81 %description -l pl.UTF-8
82 Werkzeug początkowo był prostym zbiorem różnych narzędzi dla aplikacji
83 WSGI, a stał się jednym z najbardziej zaawansowanych modułów
84 narzędziowych WSGI. Zawiera potężny debugger, obiekty żądania i
85 odpowiedzi z pełną funkcjonalnością, narzędzia HTTP do obsługi
86 znaczników encji, nagłówki sterujące buforowaniem, daty HTTP, obsługę
87 ciasteczek, przesyłanie plików, potężny system trasowania URL oraz
88 wiele dodatkowych modułów udostępnionych przez społeczność.
90 %package -n python3-%{module}
91 Summary: The Swiss Army knife of Python web development
92 Summary(pl.UTF-8): Scyzoryk szwajcarski programisty aplikacji WWW
93 Group: Libraries/Python
94 Requires: python3-modules >= 1:3.3
96 %description -n python3-%{module}
97 Werkzeug started as simple collection of various utilities for WSGI
98 applications and has become one of the most advanced WSGI utility
99 modules. It includes a powerful debugger, full featured request and
100 response objects, HTTP utilities to handle entity tags, cache control
101 headers, HTTP dates, cookie handling, file uploads, a powerful URL
102 routing system and a bunch of community contributed addon modules.
104 %description -n python3-%{module} -l pl.UTF-8
105 Werkzeug początkowo był prostym zbiorem różnych narzędzi dla aplikacji
106 WSGI, a stał się jednym z najbardziej zaawansowanych modułów
107 narzędziowych WSGI. Zawiera potężny debugger, obiekty żądania i
108 odpowiedzi z pełną funkcjonalnością, narzędzia HTTP do obsługi
109 znaczników encji, nagłówki sterujące buforowaniem, daty HTTP, obsługę
110 ciasteczek, przesyłanie plików, potężny system trasowania URL oraz
111 wiele dodatkowych modułów udostępnionych przez społeczność.
114 Summary: Documentation for Python Werkzeug package
115 Summary(pl.UTF-8): Dokumentacja do pakietu Pythona Werkzeug
119 Documentation for Python Werkzeug package.
121 %description apidocs -l pl.UTF-8
122 Dokumentacja do pakietu Pythona Werkzeug.
125 %setup -q -n werkzeug-%{version}
129 %py_build %{?with_tests:test}
133 %py3_build %{?with_tests:test}
138 %{__make} -C docs html
142 rm -rf $RPM_BUILD_ROOT
147 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
148 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
149 find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -name '*.py' \
150 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
156 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
157 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
158 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
159 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
163 rm -rf $RPM_BUILD_ROOT
167 %defattr(644,root,root,755)
168 %doc CHANGES.rst LICENSE.rst README.rst
169 %{py_sitescriptdir}/werkzeug
170 %{py_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
171 %{_examplesdir}/python-%{module}-%{version}
175 %files -n python3-%{module}
176 %defattr(644,root,root,755)
177 %doc CHANGES.rst LICENSE.rst README.rst
178 %{py3_sitescriptdir}/werkzeug
179 %{py3_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
180 %{_examplesdir}/python3-%{module}-%{version}
185 %defattr(644,root,root,755)
186 %doc docs/_build/html/{_images,_static,contrib,deployment,*.html,*.js}