diff options
author | Brett Cannon <bcannon@gmail.com> | 2004-12-07 03:25:18 +0000 |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2004-12-07 03:25:18 +0000 |
commit | 91a5c1e74664d60118af03767f12c08599f01745 (patch) | |
tree | 12fd576fe44ea3f23af59f2ffa387eb991a832b3 /Lib/optparse.py | |
parent | b0eb2b440f4d3e35fccf5b32632eade3645d321e (diff) | |
download | cpython-91a5c1e74664d60118af03767f12c08599f01745.tar.gz |
Change code in setup.py for parsing LDFLAGS and CPPFLAGS to use optparse
instead of getopt. Required making use of gettext._ as optional (optparse
changed OK'ed by Greg Ward in private email).
Diffstat (limited to 'Lib/optparse.py')
-rw-r--r-- | Lib/optparse.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/optparse.py b/Lib/optparse.py index 4a3d3a8950..6d3c94bff3 100644 --- a/Lib/optparse.py +++ b/Lib/optparse.py @@ -69,7 +69,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import sys, os import types import textwrap -from gettext import gettext as _ +try: + from gettext import gettext as _ +except ImportError: + _ = lambda arg: arg def _repr(self): return "<%s at 0x%x: %s>" % (self.__class__.__name__, id(self), self) |