%if 0%{?fedora} > 12 || 0%{?rhel} > 6 %global with_python3 1 %else %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif Name: python-beaker Version: 1.5.3 Release: 3%{?dist} Summary: WSGI middleware layer to provide sessions Group: Development/Languages License: BSD URL: http://beaker.groovie.org/ Source0: http://pypi.python.org/packages/source/B/Beaker/Beaker-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-setuptools-devel # Needed for the tst suite BuildRequires: python-nose python python-webtest %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: /usr/bin/2to3 %endif # if with_python3 %description Beaker is a caching library that includes Session and Cache objects built on Myghty's Container API used in MyghtyUtils. WSGI middleware is also included to manage Session objects and signed cookies. %if 0%{?with_python3} %package -n python3-beaker Summary: WSGI middleware layer to provide sessions Group: Development/Languages %description -n python3-beaker Beaker is a caching library that includes Session and Cache objects built on Myghty's Container API used in MyghtyUtils. WSGI middleware is also included to manage Session objects and signed cookies. %endif # with_python3 %prep %setup -q -n Beaker-%{version} %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} 2to3 --write --nobackups %{py3dir} %endif # with_python3 %build %{__python} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # with_python3 %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT popd %endif # with_python3 %check PYTHONPATH=$(pwd) nosetests %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc LICENSE CHANGELOG %{python_sitelib}/beaker/ %{python_sitelib}/Beaker* %if 0%{?with_python3} %files -n python3-beaker %defattr(-,root,root,-) %{python3_sitelib}/beaker/ %{python3_sitelib}/Beaker* %endif %changelog * Sun Jun 27 2010 Kyle VanderBeek <kylev@kylev.com> - 1.5.3-3 - Add python3 conditionals * Thu May 06 2010 Luke Macken <lmacken@redhat.com> - 1.5.3-2 - Add a python3 subpackage * Mon Mar 22 2010 Luke Macken <lmacken@redhat.com> - 1.5.3-1 - Update to 1.5.3 - Remove the abspath patch, which was fixed upstream - Run the test suite * Fri Jan 22 2010 Luke Macken <lmacken@redhat.com> - 1.5.1-1 - Update to 1.5.1 - Remove beaker-hmac2.4.patch, which made it into 1.4 upstream - Remove middleware-config.patch which is also upstream * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Tue Jul 21 2009 Kyle VanderBeek <kylev@kylev.com> - 1.3.1-5 - Add patch based on upstream hg 403ef7c82d32 for config overwriting that breaks Pylons unit tests * Sat Jun 27 2009 Luke Macken <lmacken@redhat.com> - 1.3.1-4 - Add a patch to remove the use of __future__.absolute_import in the google backend * Sat Jun 20 2009 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3.1-3 - Different hmac patch suitable for upstream inclusion. * Tue Jun 02 2009 Luke Macken <lmacken@redhat.com> - 1.3.1-2 - Add a patch to remove Beaker's use of hashlib on Python2.4, due to incompatiblities with Python's hmac module (#503772) * Sun May 31 2009 Luke Macken <lmacken@redhat.com> - 1.3.1-1 - Update to 1.3.1 * Tue Apr 07 2009 Felix Schwarz <felix.schwarz@oss.schwarz.eu> - 1.3-1 - Update to 1.3 * Sun Apr 05 2009 Felix Schwarz <felix.schwarz@oss.schwarz.eu> - 1.2.3-1 - Update to 1.2.3 * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Tue Jan 06 2009 Luke Macken <lmacken@redhat.com> - 1.1.3-1 - Update to 1.1.3 * Sat Dec 20 2008 Felix Schwarz <felix.schwarz@oss.schwarz.eu> - 1.1.2-1 - Update to 1.1.2 * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.0.3-2 - Rebuild for Python 2.6 * Tue Jun 24 2008 Felix Schwarz <felix.schwarz@oss.schwarz.eu> - 1.0.3-1 - Update to 1.0.3. * Tue Jun 24 2008 Kyle VanderBeek <kylev@kylev.com> - 0.9.5-1 - Update to 0.9.5. - Remove license patch which is now corrected upstream. * Mon May 12 2008 Kyle VanderBeek <kylev@kylev.com> - 0.9.4-4 - Fix files to not use wildcard, fixing dir ownership * Mon May 12 2008 Kyle VanderBeek <kylev@kylev.com> - 0.9.4-3 - Corrected license * Mon May 12 2008 Kyle VanderBeek <kylev@kylev.com> - 0.9.4-2 - More restrictive file includes for safety * Sun May 11 2008 Kyle VanderBeek <kylev@kylev.com> - 0.9.4-1 - Update to 0.9.4 (security fix) - Fix rpmlint complaints, add CHANGELOG and LICENSE * Wed Apr 9 2008 Kyle VanderBeek <kylev@kylev.com> - 0.9.3-1 - Initial version.