[python-cement] add patch for python 3.3 support (patch 1)
dmalcolm
dmalcolm at fedoraproject.org
Fri Aug 3 21:18:27 UTC 2012
commit 2be5f9fc69abdd6b2fca69fac72f2862e9dd8e84
Author: David Malcolm <dmalcolm at redhat.com>
Date: Fri Aug 3 17:17:20 2012 -0400
add patch for python 3.3 support (patch 1)
py33-fixes.patch | 36 ++++++++++++++++++++++++++++++++++++
python-cement.spec | 11 ++++++++++-
2 files changed, 46 insertions(+), 1 deletions(-)
---
diff --git a/py33-fixes.patch b/py33-fixes.patch
new file mode 100644
index 0000000..353d9d2
--- /dev/null
+++ b/py33-fixes.patch
@@ -0,0 +1,36 @@
+diff -up cement-1.9.14/cement/core/extension.py.py33-fixes cement-1.9.14/cement/core/extension.py
+--- cement-1.9.14/cement/core/extension.py.py33-fixes 2012-07-16 01:53:06.000000000 -0400
++++ cement-1.9.14/cement/core/extension.py 2012-08-03 17:06:16.208531390 -0400
+@@ -138,7 +138,7 @@ class CementExtensionHandler(handler.Cem
+ LOG.debug("loading the '%s' framework extension" % ext_module)
+ try:
+ if ext_module not in sys.modules:
+- __import__(ext_module, globals(), locals(), [], -1)
++ __import__(ext_module, globals(), locals(), [], 0)
+
+ if hasattr(sys.modules[ext_module], 'load'):
+ sys.modules[ext_module].load()
+diff -up cement-1.9.14/cement/core/foundation.py.py33-fixes cement-1.9.14/cement/core/foundation.py
+--- cement-1.9.14/cement/core/foundation.py.py33-fixes 2012-08-03 17:09:48.018516904 -0400
++++ cement-1.9.14/cement/core/foundation.py 2012-08-03 17:10:12.599515227 -0400
+@@ -428,7 +428,7 @@ class CementApp(meta.MetaMixin):
+
+ if self._meta.bootstrap not in sys.modules \
+ or self._loaded_bootstrap is None:
+- __import__(self._meta.bootstrap, globals(), locals(), [], -1)
++ __import__(self._meta.bootstrap, globals(), locals(), [], 0)
+ if hasattr(sys.modules[self._meta.bootstrap], 'load'):
+ sys.modules[self._meta.bootstrap].load()
+
+diff -up cement-1.9.14/cement/ext/ext_plugin.py.py33-fixes cement-1.9.14/cement/ext/ext_plugin.py
+--- cement-1.9.14/cement/ext/ext_plugin.py.py33-fixes 2012-08-03 17:09:40.105517450 -0400
++++ cement-1.9.14/cement/ext/ext_plugin.py 2012-08-03 17:10:55.096512320 -0400
+@@ -137,7 +137,7 @@ class CementPluginHandler(plugin.CementP
+
+ # We don't catch this because it would make debugging a nightmare
+ if full_module not in sys.modules:
+- __import__(full_module, globals(), locals(), [], -1)
++ __import__(full_module, globals(), locals(), [], 0)
+
+ if hasattr(sys.modules[full_module], 'load'):
+ sys.modules[full_module].load()
diff --git a/python-cement.spec b/python-cement.spec
index 0fb338f..f5d4306 100644
--- a/python-cement.spec
+++ b/python-cement.spec
@@ -10,7 +10,7 @@
%global srcname cement
Name: python-%{srcname}
Version: 1.9.14
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: CLI Application Framework for Python
Group: Applications/System
License: BSD
@@ -18,6 +18,11 @@ License: BSD
URL: http://builtoncement.org
Source0: http://builtoncement.org/cement/1.9/source/%{srcname}-%{version}.tar.gz
+# Fix python 3.3 incompatibilities
+# Reported upstream as https://github.com/cement/cement/issues/156
+# (Test suite passes with python 2.7, 3.2, 3.3b1)
+Patch1: py33-fixes.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -47,6 +52,7 @@ sacrificing quality.
%prep
%setup -q -n cement-%{version}
+%patch1 -p1
%if 0%{?with_python3}
rm -rf %{py3dir}
@@ -106,6 +112,9 @@ rm -rf %{buildroot}
%endif
%changelog
+* Fri Aug 3 2012 David Malcolm <dmalcolm at redhat.com> - 1.9.14-4
+- add patch for python 3.3 support (patch 1)
+
* Fri Aug 3 2012 David Malcolm <dmalcolm at redhat.com> - 1.9.14-3
- remove rhel logic from with_python3 conditional
More information about the scm-commits
mailing list