diff --git a/python-kitchen-expose-base64-py34.patch b/python-kitchen-expose-base64-py34.patch new file mode 100644 index 0000000..4105037 --- /dev/null +++ b/python-kitchen-expose-base64-py34.patch @@ -0,0 +1,63 @@ +From 29d32434e6ba96e2ffc5eb80345f602b7ee6365d Mon Sep 17 00:00:00 2001 +From: Ralph Bean +Date: Tue, 2 Dec 2014 14:54:46 -0500 +Subject: [PATCH] Expose py34 base64 functions if available. + +--- + kitchen3/kitchen/pycompat24/base64/__init__.py | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +diff --git a/kitchen3/kitchen/pycompat24/base64/__init__.py b/kitchen3/kitchen/pycompat24/base64/__init__.py +index ff25e2a..236e841 100644 +--- a/kitchen3/kitchen/pycompat24/base64/__init__.py ++++ b/kitchen3/kitchen/pycompat24/base64/__init__.py +@@ -3,17 +3,17 @@ + # Copyright (c) 2012 Red Hat, Inc + # + # This file is part of kitchen +-# ++# + # kitchen is free software; you can redistribute it and/or modify it under the + # terms of the GNU Lesser General Public License as published by the Free + # Software Foundation; either version 2.1 of the License, or (at your option) + # any later version. +-# ++# + # kitchen is distributed in the hope that it will be useful, but WITHOUT ANY + # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for + # more details. +-# ++# + # You should have received a copy of the GNU Lesser General Public License + # along with kitchen; if not, see + # +@@ -37,7 +37,7 @@ of that module for use on python-2.3. + # :W0401,W0614: The purpose of this module is to create a backport of base64 + # so we ignore these pylint warnings + +-import warnings ++import warnings + + warnings.warn('In python3, kitchen.pycompat24.base64 is deprecated.' + ' If your code doesn\'t have to remain compatible with python2 use' +@@ -50,7 +50,15 @@ from base64 import * + decodestring = decode + encodestring = encode + +-__all__ = ( 'b16decode', 'b16encode', 'b32decode', 'b32encode', 'b64decode', ++__all__ = ('b16decode', 'b16encode', 'b32decode', 'b32encode', 'b64decode', + 'b64encode', 'decode', 'decodebytes', 'decodestring', 'encode', + 'encodebytes', 'encodestring', 'standard_b64decode', + 'standard_b64encode', 'urlsafe_b64decode', 'urlsafe_b64encode',) ++ ++# These were added in python3.4, so we'll let them shine through... ++import sys ++_major, _minor = sys.version_info[:2] ++if _major == 3 and _minor >= 4: ++ __all__ = __all__ + ( ++ 'b85decode', 'a85decode', 'b85encode', 'a85encode', ++ ) +-- +1.9.3 + diff --git a/python-kitchen.spec b/python-kitchen.spec index 4f4f022..d22e0c8 100644 --- a/python-kitchen.spec +++ b/python-kitchen.spec @@ -11,13 +11,17 @@ Name: python-kitchen Version: 1.2.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Small, useful pieces of code to make python coding easier Group: Development/Languages License: LGPLv2+ URL: https://pypi.python.org/pypi/kitchen/ Source0: https://fedorahosted.org/releases/k/i/kitchen/kitchen-%{version}.tar.gz + +# http://git.io/8KLw1Q +Patch0: python-kitchen-expose-base64-py34.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -96,6 +100,8 @@ python-3 version of the kitchen library. %prep %setup -q -n kitchen-%{version} +%patch0 -p1 + # Remove bundled egg info, if any. rm -rf *.egg* @@ -180,6 +186,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Dec 02 2014 Ralph Bean - 1.2.1-2 +- Include patch to get py34 tests working for rawhide. + * Tue Dec 02 2014 Ralph Bean - 1.2.1-1 - Latest upstream, now with python3 support! - Added python3 subpackages.