File ooo-build-3.0.0.9-pyuno-python-2.6-uno-import.diff of Package OpenOffice_org-bootstrap

--- patches/dev300/apply
+++ patches/dev300/apply
@@ -63,8 +63,8 @@
 SUSE-10.2 : NovellBase, BerkeleyDB43, EMFPlus, Java14, OpenGLTransitionsMesa703
 SUSE-10.3 : NovellBase, BerkeleyDB43, EMFPlus, Java14
 SUSE-11.0 : NovellBase, BerkeleyDB43, Gcc43, EMFPlus, CairoFonts, PostgreSQL
-SUSE-11.1 : NovellBase, BerkeleyDB43, Gcc43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL
-SUSE      : NovellBase, BerkeleyDB43, Gcc43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL
+SUSE-11.1 : NovellBase, BerkeleyDB43, Gcc43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL, Python26
+SUSE      : NovellBase, BerkeleyDB43, Gcc43, EMFPlus, CairoFonts, ImpressFontSize, PostgreSQL, Python26
 SUSE-reduced:NovellBase,BerkeleyDB43, ReducedDefaults
 # Debian
 DebianBase : LinuxCommon, DebianBaseOnly, Lockdown, GCCSTL, BerkeleyDB43, Split, PostgreSQL
@@ -1153,6 +1153,11 @@
 # another fallback to load libhsqldb with JRE 1.4
 connectivity-load-libhsqldb-with-jre-1.4.diff, n#431360, pmladek
 
+[ Python26 ]
+
+# python2.6 has __import__ with four parameters
+pyuno-python-2.6-uno-import.diff, n#448776, pmladek
+
 [ GTK28 ]
 
 # gtk-2.8 does not know the link-color properties;
--- patches/dev300/pyuno-python-2.6-uno-import.diff
+++ patches/dev300/pyuno-python-2.6-uno-import.diff
@@ -0,0 +1,26 @@
+--- pyuno/source/module/uno.py.old	2008-04-11 12:36:09.000000000 +0200
++++ pyuno/source/module/uno.py	2008-11-27 20:41:07.000000000 +0100
+@@ -249,19 +249,13 @@ def invoke( object, methodname, argTuple
+ #---------------------------------------------------------------------------------------
+ # don't use any functions beyond this point, private section, likely to change
+ #---------------------------------------------------------------------------------------
+-def _uno_import( name, *optargs ):
++def _uno_import( name, globals={}, locals={}, fromlist=[], level=-1 ):
+     try:
+ #       print "optargs = " + repr(optargs)
+-        if len(optargs) == 0:
+-           return _g_delegatee( name )
+-           #print _g_delegatee
+-        return _g_delegatee( name, *optargs )
++        return _g_delegatee( name, globals, locals, fromlist, level )
+     except ImportError:
+-        if len(optargs) != 3 or not optargs[2]:
+-           raise
+-    globals = optargs[0]
+-    locals = optargs[1]
+-    fromlist = optargs[2]
++        if not fromlist:
++            raise
+     modnames = name.split( "." )
+     mod = None
+     d = sys.modules
openSUSE Build Service is sponsored by