]> git.pld-linux.org Git - packages/python3-werkzeug.git/blob - python-werkzeug.spec
b27df734866635a67a5b3a1111e28754b94f2981
[packages/python3-werkzeug.git] / python-werkzeug.spec
1 # Conditional build:
2 #
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
7
8 %define         module  werkzeug
9 Summary:        The Swiss Army knife of Python web development
10 Name:           python-%{module}
11 Version:        0.11.10
12 Release:        2
13 License:        BSD
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/
19 %if %{with python2}
20 BuildRequires:  python-distribute
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.710
23 Requires:       python-modules
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-devel
27 BuildRequires:  python3-distribute
28 BuildRequires:  python3-modules
29 %endif
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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.
40
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
46
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.
54
55 %prep
56 %setup -q -n werkzeug-%{version}
57
58 %build
59 %if %{with python2}
60 %py_build %{?with_tests:test}
61 %endif
62
63 %if %{with python3}
64 %py3_build %{?with_tests:test}
65 %endif
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 %if %{with python2}
70 %py_install
71 %py_postclean
72
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}|'
77 %endif
78
79 %if %{with python3}
80 %py3_install
81
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}|'
86 %endif
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %if %{with python2}
92 %files
93 %defattr(644,root,root,755)
94 %doc AUTHORS CHANGES
95 %{py_sitescriptdir}/werkzeug
96 %{py_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
97 %{_examplesdir}/python-%{module}-%{version}
98 %endif
99
100 %if %{with python3}
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}
107 %endif
This page took 0.123923 seconds and 3 git commands to generate.