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 | 84667c063a1e93a985134f7cef376edf82941c02 (patch) | |
tree | 04ea49ba40272d175f7ae7dd5a3253d00887d3b3 /Lib/optparse.py | |
parent | 516592f4ff13ee39ebd115088c7429631328e2db (diff) | |
download | cpython-git-84667c063a1e93a985134f7cef376edf82941c02.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) |