rpms/python-beaker/devel python-beaker.spec,1.17,1.18

Luke Macken lmacken at fedoraproject.org
Thu May 6 18:31:54 UTC 2010


Author: lmacken

Update of /cvs/pkgs/rpms/python-beaker/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv20347

Modified Files:
	python-beaker.spec 
Log Message:
Add a python3 subpackage


Index: python-beaker.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-beaker/devel/python-beaker.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- python-beaker.spec	22 Mar 2010 19:40:30 -0000	1.17
+++ python-beaker.spec	6 May 2010 18:31:54 -0000	1.18
@@ -1,8 +1,10 @@
 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
 
+%global with_python3 1
+
 Name: python-beaker
 Version: 1.5.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: WSGI middleware layer to provide sessions
 
 Group: Development/Languages
@@ -15,24 +17,59 @@ 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
@@ -47,8 +84,18 @@ rm -rf $RPM_BUILD_ROOT
 %{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
+* Thu May 06 2010 Luke Macken <lmacken at redhat.com> - 1.5.3-2
+- Add a python3 subpackage
+
 * Mon Mar 22 2010 Luke Macken <lmacken at redhat.com> - 1.5.3-1
 - Update to 1.5.3
 - Remove the abspath patch, which was fixed upstream



More information about the scm-commits mailing list