packages: python-pygobject/py3.patch (NEW) commit 9562842907a9d94f6adae2c1b...

wiget wiget at pld-linux.org
Mon Nov 1 17:56:39 CET 2010


Author: wiget                        Date: Mon Nov  1 16:56:39 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
commit 9562842907a9d94f6adae2c1bb20d6b1f189abda
Author: John (J5) Palmieri <johnp at redhat.com>
Date:   Tue Sep 28 13:15:57 2010 -0400
    Python 3 fixes for dsextras and the python.m4 distribution files

---- Files affected:
packages/python-pygobject:
   py3.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/python-pygobject/py3.patch
diff -u /dev/null packages/python-pygobject/py3.patch:1.1
--- /dev/null	Mon Nov  1 17:56:39 2010
+++ packages/python-pygobject/py3.patch	Mon Nov  1 17:56:34 2010
@@ -0,0 +1,66 @@
+commit 9562842907a9d94f6adae2c1bb20d6b1f189abda
+Author: John (J5) Palmieri <johnp at redhat.com>
+Date:   Tue Sep 28 13:15:57 2010 -0400
+
+    Python 3 fixes for dsextras and the python.m4 distribution files
+
+diff --git a/dsextras.py b/dsextras.py
+index 10973e2..db771f2 100644
+--- a/dsextras.py
++++ b/dsextras.py
+@@ -122,8 +122,8 @@ class BuildExt(build_ext):
+             msnative_struct = { '2' : '-fnative-struct',
+                                 '3' : '-mms-bitfields' }
+             gcc_version = getoutput('gcc -dumpversion')
+-            print 'using MinGW GCC version %s with %s option' % \
+-                  (gcc_version, msnative_struct[gcc_version[0]])
++            print ('using MinGW GCC version %s with %s option' % \
++                  (gcc_version, msnative_struct[gcc_version[0]]))
+             self.extra_compile_args.append(msnative_struct[gcc_version[0]])
+ 
+     def modify_compiler(self):
+@@ -312,9 +312,9 @@ class PkgConfigExtension(Extension):
+                 self.can_build_ok = 1
+                 return 1
+             else:
+-                print "Warning: Too old version of %s" % self.pkc_name
+-                print "         Need %s, but %s is installed" % \
+-                      (version, orig_version)
++                print ("Warning: Too old version of %s" % self.pkc_name)
++                print ("         Need %s, but %s is installed" % \
++                      (version, orig_version))
+                 self.can_build_ok = 0
+                 return 0
+ 
+@@ -343,7 +343,8 @@ try:
+     from codegen.codegen import register_types, SourceWriter, \
+          FileOutput
+     import codegen.createdefs
+-except ImportError, e:
++except ImportError:
++    (etype, e) = sys.exc_info()[:2]    
+     template_classes_enabled=False
+ 
+ class Template(object):
+diff --git a/m4/python.m4 b/m4/python.m4
+index bdc8ee6..372627b 100644
+--- a/m4/python.m4
++++ b/m4/python.m4
+@@ -196,7 +196,7 @@ python2.1 python2.0])
+   dnl doesn't work.
+   AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+     [am_cv_python_pythondir],
+-    [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null ||
++    [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX'))" 2>/dev/null ||
+      echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`])
+   AC_SUBST([pythondir], [$am_cv_python_pythondir])
+ 
+@@ -213,7 +213,7 @@ python2.1 python2.0])
+   dnl doesn't work.
+   AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+     [am_cv_python_pyexecdir],
+-    [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null ||
++    [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print(sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX'))" 2>/dev/null ||
+      echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`])
+   AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+ 
================================================================


More information about the pld-cvs-commit mailing list