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