[Erp5-report] r44016 arnaud.fontaine - /erp5/trunk/patches/

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Mar 7 15:00:59 CET 2011


Author: arnaud.fontaine
Date: Mon Mar  7 15:00:59 2011
New Revision: 44016

URL: http://svn.erp5.org?rev=44016&view=rev
Log:
When building Python modules, struct module is not available yet and
is required by gettext which is in turn required by optparse (used in
setup.py to parse CPPFLAGS and LDFLAGS), thus catch gettext import
error in Lib/optparse.py, likewise Python 2.6.


Modified:
    erp5/trunk/patches/python2.4-backport-CPPFLAGS-setup-from-python2.6.patch

Modified: erp5/trunk/patches/python2.4-backport-CPPFLAGS-setup-from-python2.6.patch
URL: http://svn.erp5.org/erp5/trunk/patches/python2.4-backport-CPPFLAGS-setup-from-python2.6.patch?rev=44016&r1=44015&r2=44016&view=diff
==============================================================================
--- erp5/trunk/patches/python2.4-backport-CPPFLAGS-setup-from-python2.6.patch [utf8] (original)
+++ erp5/trunk/patches/python2.4-backport-CPPFLAGS-setup-from-python2.6.patch [utf8] Mon Mar  7 15:00:59 2011
@@ -71,3 +71,21 @@ the fix from Python 2.6.
          # Add paths to popular package managers on OS X/darwin
          if sys.platform == "darwin":
              # Fink installs into /sw by default
+--- Lib/optparse.py	2006-05-29 03:15:43.000000000 +0900
++++ Lib/optparse.py	2011-03-07 21:20:17.192000789 +0900
+@@ -69,7 +69,13 @@
+ import sys, os
+ import types
+ import textwrap
+-from gettext import gettext as _
++
++try:
++    from gettext import gettext
++except ImportError:
++    def gettext(message):
++        return message
++_ = gettext
+ 
+ def _repr(self):
+     return "<%s at 0x%x: %s>" % (self.__class__.__name__, id(self), self)
+



More information about the Erp5-report mailing list