2 # %bcond_without doc # don't build doc
3 %bcond_with tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 %define module werkzeug
8 Summary: The Swiss Army knife of Python web development
13 Group: Development/Languages/Python
14 # Source0: http://pypi.python.org/packages/source/W/Werkzeug/Werkzeug-%{version}.tar.gz
15 Source0: https://github.com/pallets/werkzeug/archive/%{version}.tar.gz
16 # Source0-md5: 5010591f97c36722027bd23ade0029e3
17 URL: http://werkzeug.pocoo.org/
19 BuildRequires: python-distribute
20 BuildRequires: rpm-pythonprov
21 BuildRequires: rpmbuild(macros) >= 1.710
22 Requires: python-modules
25 BuildRequires: python3-devel
26 BuildRequires: python3-distribute
27 BuildRequires: python3-modules
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 Werkzeug started as simple collection of various utilities for WSGI
35 applications and has become one of the most advanced WSGI utility
36 modules. It includes a powerful debugger, full featured request and
37 response objects, HTTP utilities to handle entity tags, cache control
38 headers, HTTP dates, cookie handling, file uploads, a powerful URL
39 routing system and a bunch of community contributed addon modules.
41 %package -n python3-%{module}
42 Summary: The Swiss Army knife of Python web development
43 Summary(pl.UTF-8): Zbiór narzędzi dla rozwouju aplikacji sieciowych dla Pythona
44 Group: Libraries/Python
45 Requires: python3-modules
47 %description -n python3-%{module}
48 Werkzeug started as simple collection of various utilities for WSGI
49 applications and has become one of the most advanced WSGI utility
50 modules. It includes a powerful debugger, full featured request and
51 response objects, HTTP utilities to handle entity tags, cache control
52 headers, HTTP dates, cookie handling, file uploads, a powerful URL
53 routing system and a bunch of community contributed addon modules.
56 # %description -n python3-%{module} -l pl.UTF-8
59 %setup -q -n werkzeug-%{version}
63 %py_build %{?with_tests:test}
67 %py3_build %{?with_tests:test}
72 rm -rf $RPM_BUILD_ROOT
85 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
86 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
89 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
90 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
91 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
92 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
97 rm -rf $RPM_BUILD_ROOT
101 %defattr(644,root,root,755)
103 %{py_sitescriptdir}/werkzeug
104 %if "%{py_ver}" > "2.4"
105 %{py_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
107 %{_examplesdir}/%{name}-%{version}
111 %files -n python3-%{module}
112 %defattr(644,root,root,755)
113 %doc AUTHORS CHANGES LICENSE
114 %{py3_sitescriptdir}/%{module}
115 %{py3_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
116 %{_examplesdir}/python3-%{module}-%{version}