]> git.pld-linux.org Git - packages/python3-werkzeug.git/blame_incremental - python-werkzeug.spec
- updated to 0.11.15
[packages/python3-werkzeug.git] / python-werkzeug.spec
... / ...
CommitLineData
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
9Summary: The Swiss Army knife of Python web development
10Summary(pl.UTF-8): Scyzoryk szwajcarski programisty aplikacji WWW
11Name: python-%{module}
12Version: 0.11.15
13Release: 1
14License: BSD
15Group: 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
20Source0: https://github.com/pallets/werkzeug/archive/%{version}/werkzeug-%{version}.tar.gz
21# Source0-md5: 9cb2ba56c694dbd5863ed1b13ce478c2
22Patch0: %{name}-py3.patch
23URL: http://werkzeug.pocoo.org/
24%if %{with python2}
25BuildRequires: python-devel >= 1:2.6
26BuildRequires: python-modules >= 1:2.6
27BuildRequires: python-setuptools
28%endif
29%if %{with python3}
30BuildRequires: python3-devel >= 1:3.3
31BuildRequires: python3-modules >= 1:3.3
32BuildRequires: python3-setuptools
33%endif
34BuildRequires: rpm-pythonprov
35BuildRequires: rpmbuild(macros) >= 1.714
36%if %{with doc}
37BuildRequires: sphinx-pdg
38%endif
39Requires: python-modules >= 1:2.6
40BuildArch: noarch
41BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43%description
44Werkzeug started as simple collection of various utilities for WSGI
45applications and has become one of the most advanced WSGI utility
46modules. It includes a powerful debugger, full featured request and
47response objects, HTTP utilities to handle entity tags, cache control
48headers, HTTP dates, cookie handling, file uploads, a powerful URL
49routing system and a bunch of community contributed addon modules.
50
51%description -l pl.UTF-8
52Werkzeug początkowo był prostym zbiorem różnych narzędzi dla aplikacji
53WSGI, a stał się jednym z najbardziej zaawansowanych modułów
54narzędziowych WSGI. Zawiera potężny debugger, obiekty żądania i
55odpowiedzi z pełną funkcjonalnością, narzędzia HTTP do obsługi
56znaczników encji, nagłówki sterujące buforowaniem, daty HTTP, obsługę
57ciasteczek, przesyłanie plików, potężny system trasowania URL oraz
58wiele dodatkowych modułów udostępnionych przez społeczność.
59
60%package -n python3-%{module}
61Summary: The Swiss Army knife of Python web development
62Summary(pl.UTF-8): Scyzoryk szwajcarski programisty aplikacji WWW
63Group: Libraries/Python
64Requires: python3-modules >= 1:3.3
65
66%description -n python3-%{module}
67Werkzeug started as simple collection of various utilities for WSGI
68applications and has become one of the most advanced WSGI utility
69modules. It includes a powerful debugger, full featured request and
70response objects, HTTP utilities to handle entity tags, cache control
71headers, HTTP dates, cookie handling, file uploads, a powerful URL
72routing system and a bunch of community contributed addon modules.
73
74%description -n python3-%{module} -l pl.UTF-8
75Werkzeug początkowo był prostym zbiorem różnych narzędzi dla aplikacji
76WSGI, a stał się jednym z najbardziej zaawansowanych modułów
77narzędziowych WSGI. Zawiera potężny debugger, obiekty żądania i
78odpowiedzi z pełną funkcjonalnością, narzędzia HTTP do obsługi
79znaczników encji, nagłówki sterujące buforowaniem, daty HTTP, obsługę
80ciasteczek, przesyłanie plików, potężny system trasowania URL oraz
81wiele dodatkowych modułów udostępnionych przez społeczność.
82
83%package apidocs
84Summary: Documentation for Python Werkzeug package
85Summary(pl.UTF-8): Dokumentacja do pakietu Pythona Werkzeug
86Group: Documentation
87
88%description apidocs
89Documentation for Python Werkzeug package.
90
91%description apidocs -l pl.UTF-8
92Dokumentacja 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}
108PYTHONPATH=$(pwd) \
109%{__make} -C docs html
110%endif
111
112%install
113rm -rf $RPM_BUILD_ROOT
114%if %{with python2}
115%py_install
116%py_postclean
117
118install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
119cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
120find $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
127install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
128cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
129find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
130 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
131%endif
132
133%clean
134rm -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.062262 seconds and 4 git commands to generate.