Commit feeb1534 authored by Arnaud Fontaine's avatar Arnaud Fontaine

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.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44016 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b1d29b4f
......@@ -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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment