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