]> git.pld-linux.org Git - packages/python3-werkzeug.git/blame - python3-werkzeug.spec
rebuild with python 3.10
[packages/python3-werkzeug.git] / python3-werkzeug.spec
CommitLineData
2f8691a4 1#
7c90b45b
JB
2# Conditional build:
3%bcond_without doc # Sphinx documentation
faf6ada2 4%bcond_without tests # test action
c6a9fbf4 5
995eef0a 6%define module werkzeug
c6a9fbf4 7Summary: The Swiss Army knife of Python web development
7c90b45b 8Summary(pl.UTF-8): Scyzoryk szwajcarski programisty aplikacji WWW
b1fcb247 9Name: python3-%{module}
3e1962a7 10Version: 2.0.2
c96cf9ff 11Release: 4
c6a9fbf4 12License: BSD
13Group: Development/Languages/Python
7c90b45b
JB
14# pypi release misses docs/_themes directory
15##Source0Download: https://pypi.python.org/simple/Werkzeug
16#Source0: https://files.pythonhosted.org/packages/source/W/Werkzeug/Werkzeug-%{version}.tar.gz
17#Source0Download: https://github.com/pallets/werkzeug/releases
18Source0: https://github.com/pallets/werkzeug/archive/%{version}/werkzeug-%{version}.tar.gz
3e1962a7 19# Source0-md5: 83f72a2fe8bbbe851a0e9e75994f8c49
faf6ada2 20URL: https://werkzeug.palletsprojects.com/
3e1962a7
AM
21BuildRequires: python3-devel >= 1:3.6
22BuildRequires: python3-modules >= 1:3.6
7c90b45b 23BuildRequires: python3-setuptools
7800109b 24%if %{with tests}
faf6ada2 25BuildRequires: python3-cryptography
7800109b 26BuildRequires: python3-greenlet
7800109b
JB
27BuildRequires: python3-pyOpenSSL
28BuildRequires: python3-pytest
faf6ada2 29BuildRequires: python3-pytest-timeout
7800109b
JB
30# optional
31#BuildRequires: python3-pytest-xprocess
7800109b
JB
32BuildRequires: python3-requests
33# optional
34#BuildRequires: python3-watchdog
35%endif
7c90b45b
JB
36BuildRequires: rpm-pythonprov
37BuildRequires: rpmbuild(macros) >= 1.714
38%if %{with doc}
faf6ada2 39BuildRequires: python3-pallets-sphinx-themes
b8181aea 40BuildRequires: python3-pylons-sphinx-themes
3188be72 41BuildRequires: python3-sphinx_issues
faf6ada2
JB
42BuildRequires: python3-sphinxcontrib-log-cabinet
43BuildRequires: sphinx-pdg-3
9fb4e136 44%endif
faf6ada2 45Requires: python-modules >= 1:2.7
c6a9fbf4 46BuildArch: noarch
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49%description
50Werkzeug started as simple collection of various utilities for WSGI
51applications and has become one of the most advanced WSGI utility
52modules. It includes a powerful debugger, full featured request and
53response objects, HTTP utilities to handle entity tags, cache control
54headers, HTTP dates, cookie handling, file uploads, a powerful URL
55routing system and a bunch of community contributed addon modules.
56
7c90b45b
JB
57%description -l pl.UTF-8
58Werkzeug początkowo był prostym zbiorem różnych narzędzi dla aplikacji
59WSGI, a stał się jednym z najbardziej zaawansowanych modułów
60narzędziowych WSGI. Zawiera potężny debugger, obiekty żądania i
61odpowiedzi z pełną funkcjonalnością, narzędzia HTTP do obsługi
62znaczników encji, nagłówki sterujące buforowaniem, daty HTTP, obsługę
63ciasteczek, przesyłanie plików, potężny system trasowania URL oraz
64wiele dodatkowych modułów udostępnionych przez społeczność.
65
7c90b45b
JB
66%package apidocs
67Summary: Documentation for Python Werkzeug package
68Summary(pl.UTF-8): Dokumentacja do pakietu Pythona Werkzeug
69Group: Documentation
70
71%description apidocs
72Documentation for Python Werkzeug package.
73
74%description apidocs -l pl.UTF-8
75Dokumentacja do pakietu Pythona Werkzeug.
76
c6a9fbf4 77%prep
fdb1d6ee 78%setup -q -n werkzeug-%{version}
c6a9fbf4 79
80%build
faf6ada2
JB
81%py3_build
82
83%if %{with tests}
84LC_ALL=C.UTF-8 \
85PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
86PYTEST_PLUGINS=pytest_timeout \
87PYTHONPATH=$(pwd)/src \
88%{__python3} -m pytest tests
89%endif
c6a9fbf4 90
7c90b45b 91%if %{with doc}
faf6ada2
JB
92PYTHONPATH=$(pwd)/src \
93%{__make} -C docs html \
94 SPHINXBUILD=sphinx-build-3
7c90b45b
JB
95%endif
96
c6a9fbf4 97%install
98rm -rf $RPM_BUILD_ROOT
9fb4e136 99
5db35e26 100%py3_install
9fb4e136 101
9fb4e136
MK
102install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
103cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
104find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
2f8691a4 105 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
c6a9fbf4 106
107%clean
108rm -rf $RPM_BUILD_ROOT
109
110%files
111%defattr(644,root,root,755)
3188be72 112%doc CHANGES.rst LICENSE.rst README.rst
7c90b45b 113%{py3_sitescriptdir}/werkzeug
b1dbdc2a 114%{py3_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
9fb4e136 115%{_examplesdir}/python3-%{module}-%{version}
7c90b45b
JB
116
117%if %{with doc}
118%files apidocs
119%defattr(644,root,root,755)
faf6ada2 120%doc docs/_build/html/{_images,_static,deployment,middleware,*.html,*.js}
7c90b45b 121%endif
This page took 0.066976 seconds and 4 git commands to generate.