cb2f56
%if 0%{?fedora} > 12
cb2f56
%global with_python3 1
cb2f56
%else
cb2f56
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
cb2f56
%endif
cb2f56
cb2f56
%global srcname Werkzeug
cb2f56
cb2f56
Name:           python-werkzeug
cb2f56
Version:        0.9.1
cb2f56
Release:        2%{?dist}
cb2f56
Summary:        The Swiss Army knife of Python web development 
cb2f56
cb2f56
Group:          Development/Libraries
cb2f56
License:        BSD
cb2f56
URL:            http://werkzeug.pocoo.org/
cb2f56
Source0:        http://pypi.python.org/packages/source/W/Werkzeug/%{srcname}-%{version}.tar.gz
cb2f56
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
cb2f56
cb2f56
BuildArch:      noarch
cb2f56
BuildRequires:  python-devel
cb2f56
BuildRequires:  python-setuptools
cb2f56
BuildRequires:  python-sphinx
cb2f56
cb2f56
%description
cb2f56
Werkzeug
cb2f56
========
cb2f56
cb2f56
Werkzeug started as simple collection of various utilities for WSGI
cb2f56
applications and has become one of the most advanced WSGI utility
cb2f56
modules.  It includes a powerful debugger, full featured request and
cb2f56
response objects, HTTP utilities to handle entity tags, cache control
cb2f56
headers, HTTP dates, cookie handling, file uploads, a powerful URL
cb2f56
routing system and a bunch of community contributed addon modules.
cb2f56
cb2f56
Werkzeug is unicode aware and doesn't enforce a specific template
cb2f56
engine, database adapter or anything else.  It doesn't even enforce
cb2f56
a specific way of handling requests and leaves all that up to the
cb2f56
developer. It's most useful for end user applications which should work
cb2f56
on as many server environments as possible (such as blogs, wikis,
cb2f56
bulletin boards, etc.).
cb2f56
cb2f56
cb2f56
%package doc
cb2f56
Summary:        Documentation for %{name}
cb2f56
Group:          Documentation
cb2f56
Requires:       %{name} = %{version}-%{release}
cb2f56
cb2f56
%description doc
cb2f56
Documentation and examples for %{name}.
cb2f56
cb2f56
cb2f56
%if 0%{?with_python3}
cb2f56
%package -n python3-werkzeug
cb2f56
Summary:        The Swiss Army knife of Python web development
cb2f56
BuildRequires:  python3-devel
cb2f56
BuildRequires:  python3-setuptools
cb2f56
BuildRequires:  python3-sphinx
cb2f56
cb2f56
%description -n python3-werkzeug
cb2f56
Werkzeug
cb2f56
========
cb2f56
cb2f56
Werkzeug started as simple collection of various utilities for WSGI
cb2f56
applications and has become one of the most advanced WSGI utility
cb2f56
modules.  It includes a powerful debugger, full featured request and
cb2f56
response objects, HTTP utilities to handle entity tags, cache control
cb2f56
headers, HTTP dates, cookie handling, file uploads, a powerful URL
cb2f56
routing system and a bunch of community contributed addon modules.
cb2f56
cb2f56
Werkzeug is unicode aware and doesn't enforce a specific template
cb2f56
engine, database adapter or anything else.  It doesn't even enforce
cb2f56
a specific way of handling requests and leaves all that up to the
cb2f56
developer. It's most useful for end user applications which should work
cb2f56
on as many server environments as possible (such as blogs, wikis,
cb2f56
bulletin boards, etc.).
cb2f56
cb2f56
cb2f56
%package -n python3-werkzeug-doc
cb2f56
Summary:        Documentation for python3-werkzeug
cb2f56
Group:          Documentation
cb2f56
Requires:       python3-werkzeug = %{version}-%{release}
cb2f56
cb2f56
%description -n python3-werkzeug-doc
cb2f56
Documentation and examples for python3-werkzeug.
cb2f56
%endif
cb2f56
cb2f56
cb2f56
%prep
cb2f56
%setup -q -n %{srcname}-%{version}
cb2f56
%{__sed} -i 's/\r//' LICENSE
cb2f56
%{__sed} -i '1d' werkzeug/testsuite/multipart/collect.py
cb2f56
cb2f56
%if 0%{?with_python3}
cb2f56
rm -rf %{py3dir}
cb2f56
cp -a . %{py3dir}
cb2f56
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
cb2f56
%endif
cb2f56
cb2f56
cb2f56
%build
cb2f56
%{__python} setup.py build
cb2f56
find examples/ -name '*.py' -executable | xargs chmod -x
cb2f56
find examples/ -name '*.png' -executable | xargs chmod -x
cb2f56
pushd docs
cb2f56
make html
cb2f56
popd
cb2f56
cb2f56
%if 0%{?with_python3}
cb2f56
pushd %{py3dir}
cb2f56
%{__python3} setup.py build
cb2f56
find examples/ -name '*.py' -executable | xargs chmod -x
cb2f56
find examples/ -name '*.png' -executable | xargs chmod -x
cb2f56
pushd docs
cb2f56
make html
cb2f56
popd
cb2f56
popd
cb2f56
%endif
cb2f56
cb2f56
cb2f56
%install
cb2f56
%{__rm} -rf %{buildroot}
cb2f56
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
cb2f56
%{__rm} -rf docs/_build/html/.buildinfo
cb2f56
%{__rm} -rf examples/cupoftee/db.pyc
cb2f56
cb2f56
%if 0%{?with_python3}
cb2f56
pushd %{py3dir}
cb2f56
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
cb2f56
%{__rm} -rf docs/_build/html/.buildinfo
cb2f56
%{__rm} -rf examples/cupoftee/db.pyc
cb2f56
popd
cb2f56
%endif
cb2f56
cb2f56
cb2f56
%clean
cb2f56
%{__rm} -rf %{buildroot}
cb2f56
cb2f56
%files
cb2f56
%defattr(-,root,root,-)
cb2f56
%doc AUTHORS LICENSE PKG-INFO CHANGES
cb2f56
%{python_sitelib}/*
cb2f56
cb2f56
%files doc
cb2f56
%defattr(-,root,root,-)
cb2f56
%doc docs/_build/html examples
cb2f56
cb2f56
%if 0%{?with_python3}
cb2f56
%files -n python3-werkzeug
cb2f56
%defattr(-,root,root,-)
cb2f56
%doc AUTHORS LICENSE PKG-INFO CHANGES
cb2f56
%{python3_sitelib}/*
cb2f56
cb2f56
%files -n python3-werkzeug-doc
cb2f56
%defattr(-,root,root,-)
cb2f56
%doc docs/_build/html examples
cb2f56
%endif
cb2f56
cb2f56
cb2f56
%changelog
cb2f56
* Wed Apr 30 2014 Lokesh Mandvekar <lsm5@redhat.com> - 0.9.1-2
cb2f56
- Rebuilt for RHEL-7
cb2f56
cb2f56
* Sat Jun 15 2013 Haïkel Guémar <hguemar@fedoraproject.org> - 0.9.1-1
cb2f56
- upstream 0.9.1
cb2f56
- add python3 flavor
cb2f56
cb2f56
* Fri Jun 14 2013 Ricky Elrod <codeblock@fedoraproject.org> - 0.9-1
cb2f56
- Upstream 0.9.0 release.
cb2f56
cb2f56
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.3-3
cb2f56
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
cb2f56
cb2f56
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.3-2
cb2f56
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
cb2f56
cb2f56
* Sun Feb  5 2012 Haïkel Guémar <hguemar@fedoraproject.org> - 0.8.3-1
cb2f56
- upstream 0.8.3 (fixes XSS security issues)
cb2f56
cb2f56
* Wed Jan 25 2012 Haïkel Guémar <hguemar@fedoraproject.org> - 0.8.2-1
cb2f56
- upstream 0.8.2
cb2f56
cb2f56
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-4
cb2f56
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
cb2f56
cb2f56
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.2-3
cb2f56
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
cb2f56
cb2f56
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.2-2
cb2f56
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
cb2f56
cb2f56
* Sun May 23 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6.2-1
cb2f56
- Updating because upstream release of Werkzeug 0.6.2
cb2f56
cb2f56
* Fri Mar 05 2010 Peter Halliday <phalliday@excelsiorsystems.net> - 0.6-1
cb2f56
- Updating because upstream release of Werkzeug 0.6
cb2f56
cb2f56
* Tue Aug 25 2009 Peter Halliday <phalliday@excelsiorsystems.net> - 0.5.1-1
cb2f56
- Initial package