cleanups; drop empty pl description
[packages/python3-werkzeug.git] / python-werkzeug.spec
CommitLineData
c6a9fbf4 1# Conditional build:
2f8691a4
ER
2#
3%bcond_with doc # don't build doc
9fb4e136
MK
4%bcond_with tests # do not perform "make test"
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
c6a9fbf4 7
b1dbdc2a 8%define module werkzeug
c6a9fbf4 9Summary: The Swiss Army knife of Python web development
c6a9fbf4 10Name: python-%{module}
fdb1d6ee 11Version: 0.11.10
640e4e52 12Release: 2
c6a9fbf4 13License: BSD
14Group: Development/Languages/Python
fdb1d6ee
MK
15# Source0: http://pypi.python.org/packages/source/W/Werkzeug/Werkzeug-%{version}.tar.gz
16Source0: https://github.com/pallets/werkzeug/archive/%{version}.tar.gz
17# Source0-md5: 5010591f97c36722027bd23ade0029e3
c6a9fbf4 18URL: http://werkzeug.pocoo.org/
9fb4e136 19%if %{with python2}
c6a9fbf4 20BuildRequires: python-distribute
21BuildRequires: rpm-pythonprov
1c603c6d 22BuildRequires: rpmbuild(macros) >= 1.710
b0214460 23Requires: python-modules
9fb4e136
MK
24%endif
25%if %{with python3}
26BuildRequires: python3-devel
27BuildRequires: python3-distribute
28BuildRequires: python3-modules
9fb4e136 29%endif
c6a9fbf4 30BuildArch: noarch
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34Werkzeug started as simple collection of various utilities for WSGI
35applications and has become one of the most advanced WSGI utility
36modules. It includes a powerful debugger, full featured request and
37response objects, HTTP utilities to handle entity tags, cache control
38headers, HTTP dates, cookie handling, file uploads, a powerful URL
39routing system and a bunch of community contributed addon modules.
40
9fb4e136
MK
41%package -n python3-%{module}
42Summary: The Swiss Army knife of Python web development
43Summary(pl.UTF-8): Zbiór narzędzi dla rozwouju aplikacji sieciowych dla Pythona
44Group: Libraries/Python
640e4e52 45Requires: python3-modules
9fb4e136
MK
46
47%description -n python3-%{module}
48Werkzeug started as simple collection of various utilities for WSGI
49applications and has become one of the most advanced WSGI utility
50modules. It includes a powerful debugger, full featured request and
51response objects, HTTP utilities to handle entity tags, cache control
52headers, HTTP dates, cookie handling, file uploads, a powerful URL
53routing system and a bunch of community contributed addon modules.
54
c6a9fbf4 55%prep
fdb1d6ee 56%setup -q -n werkzeug-%{version}
c6a9fbf4 57
58%build
9fb4e136 59%if %{with python2}
5db35e26 60%py_build %{?with_tests:test}
9fb4e136
MK
61%endif
62
63%if %{with python3}
5db35e26 64%py3_build %{?with_tests:test}
9fb4e136 65%endif
c6a9fbf4 66
c6a9fbf4 67%install
68rm -rf $RPM_BUILD_ROOT
9fb4e136 69%if %{with python2}
5db35e26 70%py_install
9fb4e136 71%py_postclean
2f8691a4
ER
72
73install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
74cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
75find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -name '*.py' \
76 | xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
9fb4e136
MK
77%endif
78
79%if %{with python3}
5db35e26 80%py3_install
9fb4e136 81
9fb4e136
MK
82install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
83cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
84find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
2f8691a4 85 | xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
9fb4e136 86%endif
c6a9fbf4 87
88%clean
89rm -rf $RPM_BUILD_ROOT
90
9fb4e136 91%if %{with python2}
c6a9fbf4 92%files
93%defattr(644,root,root,755)
94%doc AUTHORS CHANGES
95%{py_sitescriptdir}/werkzeug
b1dbdc2a 96%{py_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
2f8691a4 97%{_examplesdir}/python-%{module}-%{version}
9fb4e136
MK
98%endif
99
100%if %{with python3}
101%files -n python3-%{module}
102%defattr(644,root,root,755)
103%doc AUTHORS CHANGES LICENSE
b1dbdc2a
MK
104%{py3_sitescriptdir}/%{module}
105%{py3_sitescriptdir}/Werkzeug-%{version}-py*.egg-info
9fb4e136
MK
106%{_examplesdir}/python3-%{module}-%{version}
107%endif
This page took 0.086324 seconds and 4 git commands to generate.