3 %bcond_with doc # don't build doc
4 %bcond_with tests # do not perform "make test"
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 Name: python-%{module}
14 Group: Development/Languages/Python
15 # Source0: http://pypi.python.org/packages/source/W/Werkzeug/Werkzeug-%{version}.tar.gz
16 Source0: https://github.com/pallets/werkzeug/archive/%{version}.tar.gz
17 # Source0-md5: 5010591f97c36722027bd23ade0029e3
18 URL: http://werkzeug.pocoo.org/
20 BuildRequires: python-distribute
21 BuildRequires: rpm-pythonprov
22 BuildRequires: rpmbuild(macros) >= 1.710
23 Requires: python-modules
26 BuildRequires: python3-devel
27 BuildRequires: python3-distribute
28 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 %setup -q -n werkzeug-%{version}
60 %py_build %{?with_tests:test}
64 %py3_build %{?with_tests:test}
68 rm -rf $RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
74 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
75 find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -name '*.py' \
76 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
82 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
83 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
84 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
85 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
89 rm -rf $RPM_BUILD_ROOT
93 %defattr(644,root,root,755)
95 %{py_sitescriptdir}/werkzeug
96 %{py_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
97 %{_examplesdir}/python-%{module}-%{version}
101 %files -n python3-%{module}
102 %defattr(644,root,root,755)
103 %doc AUTHORS CHANGES LICENSE
104 %{py3_sitescriptdir}/%{module}
105 %{py3_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
106 %{_examplesdir}/python3-%{module}-%{version}