rpms/python-beaker/devel beaker-use-system-paste.patch, NONE, 1.1 python-beaker.spec, 1.20, 1.21

Toshio くらとみ toshio at fedoraproject.org
Wed Jun 30 04:42:52 UTC 2010


Author: toshio

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

Modified Files:
	python-beaker.spec 
Added Files:
	beaker-use-system-paste.patch 
Log Message:

* Mon Jun 28 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 1.5.3-4
- Add Requires for crypto libs so we have encrypted cookies
- Add patch to unbundle file that comes from paste


beaker-use-system-paste.patch:
 converters.py |   53 ++++++++++++++++++++++++++++-------------------------
 1 file changed, 28 insertions(+), 25 deletions(-)

--- NEW FILE beaker-use-system-paste.patch ---
diff -up Beaker-1.3.1/beaker/converters.py.bak Beaker-1.3.1/beaker/converters.py
--- Beaker-1.3.1/beaker/converters.py.bak	2008-02-28 16:02:30.000000000 -0500
+++ Beaker-1.3.1/beaker/converters.py	2010-06-28 20:58:33.032604522 -0400
@@ -1,26 +1,29 @@
-# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
-# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
-def asbool(obj):
-    if isinstance(obj, (str, unicode)):
-        obj = obj.strip().lower()
-        if obj in ['true', 'yes', 'on', 'y', 't', '1']:
-            return True
-        elif obj in ['false', 'no', 'off', 'n', 'f', '0']:
-            return False
-        else:
-            raise ValueError(
-                "String is not true/false: %r" % obj)
-    return bool(obj)
+try:
+    from paste.util.converters import asbool, aslist
+except ImportError:
+    # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
+    # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
+    def asbool(obj):
+        if isinstance(obj, (str, unicode)):
+            obj = obj.strip().lower()
+            if obj in ['true', 'yes', 'on', 'y', 't', '1']:
+                return True
+            elif obj in ['false', 'no', 'off', 'n', 'f', '0']:
+                return False
+            else:
+                raise ValueError(
+                    "String is not true/false: %r" % obj)
+        return bool(obj)
 
-def aslist(obj, sep=None, strip=True):
-    if isinstance(obj, (str, unicode)):
-        lst = obj.split(sep)
-        if strip:
-            lst = [v.strip() for v in lst]
-        return lst
-    elif isinstance(obj, (list, tuple)):
-        return obj
-    elif obj is None:
-        return []
-    else:
-        return [obj]
+    def aslist(obj, sep=None, strip=True):
+        if isinstance(obj, (str, unicode)):
+            lst = obj.split(sep)
+            if strip:
+                lst = [v.strip() for v in lst]
+            return lst
+        elif isinstance(obj, (list, tuple)):
+            return obj
+        elif obj is None:
+            return []
+        else:
+            return [obj]


Index: python-beaker.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-beaker/devel/python-beaker.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -p -r1.20 -r1.21
--- python-beaker.spec	28 Jun 2010 02:11:16 -0000	1.20
+++ python-beaker.spec	30 Jun 2010 04:42:52 -0000	1.21
@@ -1,23 +1,34 @@
 %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()")}
+%{!?python_sitelib: %global 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}
+Release: 4%{?dist}
 Summary: WSGI middleware layer to provide sessions
 
 Group: Development/Languages
-License: BSD
+License: BSD and MIT
 URL: http://beaker.groovie.org/
 Source0: http://pypi.python.org/packages/source/B/Beaker/Beaker-%{version}.tar.gz
+Patch0: beaker-use-system-paste.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
+%if 0%{?fedora} > 12 || 0%{?rhel}
+BuildRequires: python-setuptools
+%else
 BuildRequires: python-setuptools-devel
-# Needed for the tst suite
+%endif
+# Needed for the test suite
 BuildRequires: python-nose python python-webtest
+Requires: python-paste
+%if 0%{?fedora}
+Requires: pycryptopp
+%else
+Requires: python-crypto
+%endif
 
 %if 0%{?with_python3}
 BuildRequires: python3-devel
@@ -34,6 +45,17 @@ manage Session objects and signed cookie
 %package -n python3-beaker
 Summary: WSGI middleware layer to provide sessions
 Group: Development/Languages
+Requires: python3-paste
+# Without one of these there's no aes implementation which means there's no way to
+# have encrypted cookies.  This is a reduction in features over the python2 version.
+# Currently there's no working python3 port for either:
+# http://allmydata.org/trac/pycryptopp/ticket/35
+# http://lists.dlitz.net/pipermail/pycrypto/2010q2/000253.html
+#%if 0%{?fedora}
+#Requires: python3-pycryptopp
+#%else
+#Requires: python3-crypto
+#%endif
 
 %description -n python3-beaker
 Beaker is a caching library that includes Session and Cache objects built on
@@ -44,6 +66,7 @@ manage Session objects and signed cookie
 
 %prep
 %setup -q -n Beaker-%{version}
+%patch0 -p1 -b .system
 
 %if 0%{?with_python3}
 rm -rf %{py3dir}
@@ -64,11 +87,11 @@ popd
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
 
 %if 0%{?with_python3}
 pushd %{py3dir}
-%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
 popd
 %endif # with_python3
 
@@ -95,6 +118,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Mon Jun 28 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 1.5.3-4
+- Add Requires for crypto libs so we have encrypted cookies
+- Add patch to unbundle file that comes from paste
+
 * Sun Jun 27 2010 Kyle VanderBeek <kylev at kylev.com> - 1.5.3-3
 - Add python3 conditionals
 



More information about the scm-commits mailing list