]> git.pld-linux.org Git - packages/python3-werkzeug.git/blob - python-werkzeug.spec
- updated to 1.0.1
[packages/python3-werkzeug.git] / python-werkzeug.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  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:        1.0.1
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:  31e05a3d8e8e64e06b96c1c6a1a559ee
22 URL:            https://werkzeug.palletsprojects.com/
23 %if %{with python2}
24 BuildRequires:  python-devel >= 1:2.7
25 BuildRequires:  python-modules >= 1:2.7
26 BuildRequires:  python-setuptools
27 %if %{with tests}
28 BuildRequires:  python-cryptography
29 BuildRequires:  python-greenlet
30 BuildRequires:  python-pyOpenSSL
31 BuildRequires:  python-pytest
32 BuildRequires:  python-pytest-timeout
33 # optional
34 #BuildRequires: python-pytest-xprocess
35 BuildRequires:  python-requests
36 BuildRequires:  python-requests-mock
37 # optional
38 #BuildRequires: python-watchdog
39 %endif
40 %endif
41 %if %{with python3}
42 BuildRequires:  python3-devel >= 1:3.5
43 BuildRequires:  python3-modules >= 1:3.5
44 BuildRequires:  python3-setuptools
45 %if %{with tests}
46 BuildRequires:  python3-cryptography
47 BuildRequires:  python3-greenlet
48 BuildRequires:  python3-pyOpenSSL
49 BuildRequires:  python3-pytest
50 BuildRequires:  python3-pytest-timeout
51 # optional
52 #BuildRequires: python3-pytest-xprocess
53 BuildRequires:  python3-requests
54 # optional
55 #BuildRequires: python3-watchdog
56 %endif
57 %endif
58 BuildRequires:  rpm-pythonprov
59 BuildRequires:  rpmbuild(macros) >= 1.714
60 %if %{with doc}
61 BuildRequires:  python3-pallets-sphinx-themes
62 BuildRequires:  python3-sphinx_issues
63 BuildRequires:  python3-sphinxcontrib-log-cabinet
64 BuildRequires:  sphinx-pdg-3
65 %endif
66 Requires:       python-modules >= 1:2.7
67 BuildArch:      noarch
68 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69
70 %description
71 Werkzeug started as simple collection of various utilities for WSGI
72 applications and has become one of the most advanced WSGI utility
73 modules. It includes a powerful debugger, full featured request and
74 response objects, HTTP utilities to handle entity tags, cache control
75 headers, HTTP dates, cookie handling, file uploads, a powerful URL
76 routing system and a bunch of community contributed addon modules.
77
78 %description -l pl.UTF-8
79 Werkzeug początkowo był prostym zbiorem różnych narzędzi dla aplikacji
80 WSGI, a stał się jednym z najbardziej zaawansowanych modułów
81 narzędziowych WSGI. Zawiera potężny debugger, obiekty żądania i
82 odpowiedzi z pełną funkcjonalnością, narzędzia HTTP do obsługi
83 znaczników encji, nagłówki sterujące buforowaniem, daty HTTP, obsługę
84 ciasteczek, przesyłanie plików, potężny system trasowania URL oraz
85 wiele dodatkowych modułów udostępnionych przez społeczność.
86
87 %package -n python3-%{module}
88 Summary:        The Swiss Army knife of Python web development
89 Summary(pl.UTF-8):      Scyzoryk szwajcarski programisty aplikacji WWW
90 Group:          Libraries/Python
91 Requires:       python3-modules >= 1:3.5
92
93 %description -n python3-%{module}
94 Werkzeug started as simple collection of various utilities for WSGI
95 applications and has become one of the most advanced WSGI utility
96 modules. It includes a powerful debugger, full featured request and
97 response objects, HTTP utilities to handle entity tags, cache control
98 headers, HTTP dates, cookie handling, file uploads, a powerful URL
99 routing system and a bunch of community contributed addon modules.
100
101 %description -n python3-%{module} -l pl.UTF-8
102 Werkzeug początkowo był prostym zbiorem różnych narzędzi dla aplikacji
103 WSGI, a stał się jednym z najbardziej zaawansowanych modułów
104 narzędziowych WSGI. Zawiera potężny debugger, obiekty żądania i
105 odpowiedzi z pełną funkcjonalnością, narzędzia HTTP do obsługi
106 znaczników encji, nagłówki sterujące buforowaniem, daty HTTP, obsługę
107 ciasteczek, przesyłanie plików, potężny system trasowania URL oraz
108 wiele dodatkowych modułów udostępnionych przez społeczność.
109
110 %package apidocs
111 Summary:        Documentation for Python Werkzeug package
112 Summary(pl.UTF-8):      Dokumentacja do pakietu Pythona Werkzeug
113 Group:          Documentation
114
115 %description apidocs
116 Documentation for Python Werkzeug package.
117
118 %description apidocs -l pl.UTF-8
119 Dokumentacja do pakietu Pythona Werkzeug.
120
121 %prep
122 %setup -q -n werkzeug-%{version}
123
124 %build
125 %if %{with python2}
126 %py_build
127
128 %if %{with tests}
129 # requests_mock.contrib._pytest_plugin helps to workaround crash on cryptography deprecation warning(?)
130 LC_ALL=C.UTF-8 \
131 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
132 PYTEST_PLUGINS=pytest_timeout,requests_mock.contrib._pytest_plugin \
133 PYTHONPATH=$(pwd)/src \
134 %{__python} -m pytest tests
135 %endif
136 %endif
137
138 %if %{with python3}
139 %py3_build
140
141 %if %{with tests}
142 LC_ALL=C.UTF-8 \
143 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
144 PYTEST_PLUGINS=pytest_timeout \
145 PYTHONPATH=$(pwd)/src \
146 %{__python3} -m pytest tests
147 %endif
148 %endif
149
150 %if %{with doc}
151 PYTHONPATH=$(pwd)/src \
152 %{__make} -C docs html \
153         SPHINXBUILD=sphinx-build-3
154 %endif
155
156 %install
157 rm -rf $RPM_BUILD_ROOT
158 %if %{with python2}
159 %py_install
160 %py_postclean
161
162 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
163 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
164 find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -name '*.py' \
165         | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
166 %endif
167
168 %if %{with python3}
169 %py3_install
170
171 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
172 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
173 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
174         | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
175 %endif
176
177 %clean
178 rm -rf $RPM_BUILD_ROOT
179
180 %if %{with python2}
181 %files
182 %defattr(644,root,root,755)
183 %doc CHANGES.rst LICENSE.rst README.rst
184 %{py_sitescriptdir}/werkzeug
185 %{py_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
186 %{_examplesdir}/python-%{module}-%{version}
187 %endif
188
189 %if %{with python3}
190 %files -n python3-%{module}
191 %defattr(644,root,root,755)
192 %doc CHANGES.rst LICENSE.rst README.rst
193 %{py3_sitescriptdir}/werkzeug
194 %{py3_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
195 %{_examplesdir}/python3-%{module}-%{version}
196 %endif
197
198 %if %{with doc}
199 %files apidocs
200 %defattr(644,root,root,755)
201 %doc docs/_build/html/{_images,_static,deployment,middleware,*.html,*.js}
202 %endif
This page took 0.058215 seconds and 3 git commands to generate.