]> git.pld-linux.org Git - packages/python3-werkzeug.git/blob - python-werkzeug.spec
ba4a3c5bef1548d5f35be071becbbda72ffb2bb4
[packages/python3-werkzeug.git] / python-werkzeug.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_with     tests   # test action
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 Summary(pl.UTF-8):      Scyzoryk szwajcarski programisty aplikacji WWW
11 Name:           python-%{module}
12 Version:        0.11.15
13 Release:        1
14 License:        BSD
15 Group:          Development/Languages/Python
16 # pypi release misses docs/_themes directory
17 ##Source0Download: https://pypi.python.org/simple/Werkzeug
18 #Source0:       https://files.pythonhosted.org/packages/source/W/Werkzeug/Werkzeug-%{version}.tar.gz
19 #Source0Download: https://github.com/pallets/werkzeug/releases
20 Source0:        https://github.com/pallets/werkzeug/archive/%{version}/werkzeug-%{version}.tar.gz
21 # Source0-md5:  9cb2ba56c694dbd5863ed1b13ce478c2
22 Patch0:         %{name}-py3.patch
23 URL:            http://werkzeug.pocoo.org/
24 %if %{with python2}
25 BuildRequires:  python-devel >= 1:2.6
26 BuildRequires:  python-modules >= 1:2.6
27 BuildRequires:  python-setuptools
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-devel >= 1:3.3
31 BuildRequires:  python3-modules >= 1:3.3
32 BuildRequires:  python3-setuptools
33 %endif
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.714
36 %if %{with doc}
37 BuildRequires:  sphinx-pdg
38 %endif
39 Requires:       python-modules >= 1:2.6
40 BuildArch:      noarch
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 Werkzeug started as simple collection of various utilities for WSGI
45 applications and has become one of the most advanced WSGI utility
46 modules. It includes a powerful debugger, full featured request and
47 response objects, HTTP utilities to handle entity tags, cache control
48 headers, HTTP dates, cookie handling, file uploads, a powerful URL
49 routing system and a bunch of community contributed addon modules.
50
51 %description -l pl.UTF-8
52 Werkzeug początkowo był prostym zbiorem różnych narzędzi dla aplikacji
53 WSGI, a stał się jednym z najbardziej zaawansowanych modułów
54 narzędziowych WSGI. Zawiera potężny debugger, obiekty żądania i
55 odpowiedzi z pełną funkcjonalnością, narzędzia HTTP do obsługi
56 znaczników encji, nagłówki sterujące buforowaniem, daty HTTP, obsługę
57 ciasteczek, przesyłanie plików, potężny system trasowania URL oraz
58 wiele dodatkowych modułów udostępnionych przez społeczność.
59
60 %package -n python3-%{module}
61 Summary:        The Swiss Army knife of Python web development
62 Summary(pl.UTF-8):      Scyzoryk szwajcarski programisty aplikacji WWW
63 Group:          Libraries/Python
64 Requires:       python3-modules >= 1:3.3
65
66 %description -n python3-%{module}
67 Werkzeug started as simple collection of various utilities for WSGI
68 applications and has become one of the most advanced WSGI utility
69 modules. It includes a powerful debugger, full featured request and
70 response objects, HTTP utilities to handle entity tags, cache control
71 headers, HTTP dates, cookie handling, file uploads, a powerful URL
72 routing system and a bunch of community contributed addon modules.
73
74 %description -n python3-%{module} -l pl.UTF-8
75 Werkzeug początkowo był prostym zbiorem różnych narzędzi dla aplikacji
76 WSGI, a stał się jednym z najbardziej zaawansowanych modułów
77 narzędziowych WSGI. Zawiera potężny debugger, obiekty żądania i
78 odpowiedzi z pełną funkcjonalnością, narzędzia HTTP do obsługi
79 znaczników encji, nagłówki sterujące buforowaniem, daty HTTP, obsługę
80 ciasteczek, przesyłanie plików, potężny system trasowania URL oraz
81 wiele dodatkowych modułów udostępnionych przez społeczność.
82
83 %package apidocs
84 Summary:        Documentation for Python Werkzeug package
85 Summary(pl.UTF-8):      Dokumentacja do pakietu Pythona Werkzeug
86 Group:          Documentation
87
88 %description apidocs
89 Documentation for Python Werkzeug package.
90
91 %description apidocs -l pl.UTF-8
92 Dokumentacja do pakietu Pythona Werkzeug.
93
94 %prep
95 %setup -q -n werkzeug-%{version}
96 %patch0 -p1
97
98 %build
99 %if %{with python2}
100 %py_build %{?with_tests:test}
101 %endif
102
103 %if %{with python3}
104 %py3_build %{?with_tests:test}
105 %endif
106
107 %if %{with doc}
108 PYTHONPATH=$(pwd) \
109 %{__make} -C docs html
110 %endif
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114 %if %{with python2}
115 %py_install
116 %py_postclean
117
118 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
119 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
120 find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -name '*.py' \
121         | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
122 %endif
123
124 %if %{with python3}
125 %py3_install
126
127 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
128 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
129 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
130         | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
131 %endif
132
133 %clean
134 rm -rf $RPM_BUILD_ROOT
135
136 %if %{with python2}
137 %files
138 %defattr(644,root,root,755)
139 %doc AUTHORS CHANGES LICENSE README.rst
140 %{py_sitescriptdir}/werkzeug
141 %{py_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
142 %{_examplesdir}/python-%{module}-%{version}
143 %endif
144
145 %if %{with python3}
146 %files -n python3-%{module}
147 %defattr(644,root,root,755)
148 %doc AUTHORS CHANGES LICENSE README.rst
149 %{py3_sitescriptdir}/werkzeug
150 %{py3_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
151 %{_examplesdir}/python3-%{module}-%{version}
152 %endif
153
154 %if %{with doc}
155 %files apidocs
156 %defattr(644,root,root,755)
157 %doc docs/_build/html/{_images,_static,contrib,deployment,*.html,*.js}
158 %endif
This page took 0.044876 seconds and 2 git commands to generate.