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-md5: f7afcadc03b0f2267bdc156c34586043
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
29 Requires: python3-modules
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 Werkzeug started as simple collection of various utilities for WSGI
38 applications and has become one of the most advanced WSGI utility
39 modules. It includes a powerful debugger, full featured request and
40 response objects, HTTP utilities to handle entity tags, cache control
41 headers, HTTP dates, cookie handling, file uploads, a powerful URL
42 routing system and a bunch of community contributed addon modules.
44 %package -n python3-%{module}
45 Summary: The Swiss Army knife of Python web development
46 Summary(pl.UTF-8): Zbiór narzędzi dla rozwouju aplikacji sieciowych dla Pythona
47 Group: Libraries/Python
49 %description -n python3-%{module}
50 Werkzeug started as simple collection of various utilities for WSGI
51 applications and has become one of the most advanced WSGI utility
52 modules. It includes a powerful debugger, full featured request and
53 response objects, HTTP utilities to handle entity tags, cache control
54 headers, HTTP dates, cookie handling, file uploads, a powerful URL
55 routing system and a bunch of community contributed addon modules.
57 # %description -n python3-%{module} -l pl.UTF-8
60 %setup -q -n Werkzeug-%{version}
64 %py_build %{?with_tests:test}
68 %py3_build %{?with_tests:test}
73 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
87 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
90 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
91 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
92 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
93 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
98 rm -rf $RPM_BUILD_ROOT
102 %defattr(644,root,root,755)
104 %{py_sitescriptdir}/werkzeug
105 %if "%{py_ver}" > "2.4"
106 %{py_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
108 %{_examplesdir}/%{name}-%{version}
112 %files -n python3-%{module}
113 %defattr(644,root,root,755)
114 %doc AUTHORS CHANGES LICENSE
115 %{py3_sitescriptdir}/%{module}
116 %{py3_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
117 %{_examplesdir}/python3-%{module}-%{version}