]> git.pld-linux.org Git - packages/python3-werkzeug.git/blob - python-werkzeug.spec
Rel. 2. Fixed python3 R
[packages/python3-werkzeug.git] / python-werkzeug.spec
1 # Conditional build:
2 # %bcond_without  doc             # don't build doc
3 %bcond_with  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  werkzeug
8 Summary:        The Swiss Army knife of Python web development
9 Name:           python-%{module}
10 Version:        0.11.10
11 Release:        2
12 License:        BSD
13 Group:          Development/Languages/Python
14 # Source0:      http://pypi.python.org/packages/source/W/Werkzeug/Werkzeug-%{version}.tar.gz
15 Source0:        https://github.com/pallets/werkzeug/archive/%{version}.tar.gz
16 # Source0-md5:  5010591f97c36722027bd23ade0029e3
17 URL:            http://werkzeug.pocoo.org/
18 %if %{with python2}
19 BuildRequires:  python-distribute
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.710
22 Requires:       python-modules
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-devel
26 BuildRequires:  python3-distribute
27 BuildRequires:  python3-modules
28 %endif
29
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
56 # %description -n python3-%{module} -l pl.UTF-8
57
58 %prep
59 %setup -q -n werkzeug-%{version}
60
61 %build
62 %if %{with python2}
63 %py_build %{?with_tests:test}
64 %endif
65
66 %if %{with python3}
67 %py3_build %{?with_tests:test}
68 %endif
69
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73
74 %if %{with python2}
75 %py_install
76
77 %py_postclean
78 %endif
79
80 %if %{with python3}
81 %py3_install
82 %endif
83
84 %if %{with python2}
85 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
86 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
87 %endif
88 %if %{with python3}
89 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
90 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
91 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
92         | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
93 %endif
94 %py_postclean
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %if %{with python2}
100 %files
101 %defattr(644,root,root,755)
102 %doc AUTHORS CHANGES
103 %{py_sitescriptdir}/werkzeug
104 %if "%{py_ver}" > "2.4"
105 %{py_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
106 %endif
107 %{_examplesdir}/%{name}-%{version}
108 %endif
109
110 %if %{with python3}
111 %files -n python3-%{module}
112 %defattr(644,root,root,755)
113 %doc AUTHORS CHANGES LICENSE
114 %{py3_sitescriptdir}/%{module}
115 %{py3_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
116 %{_examplesdir}/python3-%{module}-%{version}
117 %endif
This page took 0.056177 seconds and 3 git commands to generate.