- release 5 (by relup.sh)
[packages/python3-werkzeug.git] / python-werkzeug.spec
CommitLineData
9fb4e136 1# TODO: rename to python-werkzeug
c6a9fbf4 2#
3# Conditional build:
9fb4e136
MK
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
c6a9fbf4 8
b1dbdc2a 9%define module werkzeug
c6a9fbf4 10Summary: The Swiss Army knife of Python web development
c6a9fbf4 11Name: python-%{module}
9fb4e136 12Version: 0.9.6
fbdc74b0 13Release: 5
c6a9fbf4 14License: BSD
15Group: Development/Languages/Python
b1dbdc2a 16Source0: http://pypi.python.org/packages/source/W/Werkzeug/Werkzeug-%{version}.tar.gz
9fb4e136 17# Source0-md5: f7afcadc03b0f2267bdc156c34586043
c6a9fbf4 18URL: http://werkzeug.pocoo.org/
9fb4e136 19%if %{with python2}
c6a9fbf4 20BuildRequires: python-distribute
21BuildRequires: rpm-pythonprov
c6a9fbf4 22BuildRequires: rpmbuild(macros) >= 1.219
b0214460 23Requires: python-modules
9fb4e136
MK
24%endif
25%if %{with python3}
26BuildRequires: python3-devel
27BuildRequires: python3-distribute
28BuildRequires: python3-modules
29Requires: python3-modules
30%endif
31
32
c6a9fbf4 33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37Werkzeug started as simple collection of various utilities for WSGI
38applications and has become one of the most advanced WSGI utility
39modules. It includes a powerful debugger, full featured request and
40response objects, HTTP utilities to handle entity tags, cache control
41headers, HTTP dates, cookie handling, file uploads, a powerful URL
42routing system and a bunch of community contributed addon modules.
43
9fb4e136
MK
44%package -n python3-%{module}
45Summary: The Swiss Army knife of Python web development
46Summary(pl.UTF-8): Zbiór narzędzi dla rozwouju aplikacji sieciowych dla Pythona
47Group: Libraries/Python
48
49%description -n python3-%{module}
50Werkzeug started as simple collection of various utilities for WSGI
51applications and has become one of the most advanced WSGI utility
52modules. It includes a powerful debugger, full featured request and
53response objects, HTTP utilities to handle entity tags, cache control
54headers, HTTP dates, cookie handling, file uploads, a powerful URL
55routing system and a bunch of community contributed addon modules.
56
57# %description -n python3-%{module} -l pl.UTF-8
58
c6a9fbf4 59%prep
b1dbdc2a 60%setup -q -n Werkzeug-%{version}
c6a9fbf4 61
62%build
9fb4e136 63%if %{with python2}
5db35e26 64%py_build %{?with_tests:test}
9fb4e136
MK
65%endif
66
67%if %{with python3}
5db35e26 68%py3_build %{?with_tests:test}
9fb4e136 69%endif
c6a9fbf4 70
c6a9fbf4 71
72%install
73rm -rf $RPM_BUILD_ROOT
c6a9fbf4 74
9fb4e136 75%if %{with python2}
5db35e26 76%py_install
9fb4e136
MK
77
78%py_postclean
79%endif
80
81%if %{with python3}
5db35e26 82%py3_install
9fb4e136
MK
83%endif
84
85%if %{with python2}
c6a9fbf4 86install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
87cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
9fb4e136
MK
88%endif
89%if %{with python3}
90install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
91cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
92find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
93 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
94%endif
c6a9fbf4 95%py_postclean
96
97%clean
98rm -rf $RPM_BUILD_ROOT
99
9fb4e136 100%if %{with python2}
c6a9fbf4 101%files
102%defattr(644,root,root,755)
103%doc AUTHORS CHANGES
104%{py_sitescriptdir}/werkzeug
105%if "%{py_ver}" > "2.4"
b1dbdc2a 106%{py_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
c6a9fbf4 107%endif
108%{_examplesdir}/%{name}-%{version}
9fb4e136
MK
109%endif
110
111%if %{with python3}
112%files -n python3-%{module}
113%defattr(644,root,root,755)
114%doc AUTHORS CHANGES LICENSE
b1dbdc2a
MK
115%{py3_sitescriptdir}/%{module}
116%{py3_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
9fb4e136
MK
117%{_examplesdir}/python3-%{module}-%{version}
118%endif
This page took 0.067601 seconds and 4 git commands to generate.