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