summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>2000-09-25 01:58:07 (GMT)
committerGreg Ward <gward@python.net>2000-09-25 01:58:07 (GMT)
commit2f2b6c62baf42e06c06f0dcae4879cf88dd6a916 (patch)
tree489c394b1ca54acb24bd05496422ef940d46a12c
parentd644ca2120ea2e53cca869332ca98a4638949255 (diff)
downloadcpython-2f2b6c62baf42e06c06f0dcae4879cf88dd6a916.zip
cpython-2f2b6c62baf42e06c06f0dcae4879cf88dd6a916.tar.gz
cpython-2f2b6c62baf42e06c06f0dcae4879cf88dd6a916.tar.bz2
Change to use the new 'translate_longopt()' function from fancy_getopt, rather
than rolling our own with fancy_getopt's 'longopt_xlate' global.
-rw-r--r--Lib/distutils/dist.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/distutils/dist.py b/Lib/distutils/dist.py
index f821e0a..0069b5f 100644
--- a/Lib/distutils/dist.py
+++ b/Lib/distutils/dist.py
@@ -14,7 +14,7 @@ from types import *
from copy import copy
from distutils.errors import *
from distutils import sysconfig
-from distutils.fancy_getopt import FancyGetopt, longopt_xlate
+from distutils.fancy_getopt import FancyGetopt, translate_longopt
from distutils.util import check_environ, strtobool
@@ -86,8 +86,8 @@ class Distribution:
('long-description', None,
"print the long package description"),
]
- display_option_names = map(lambda x: string.translate(x[0], longopt_xlate),
- display_options)
+ display_option_names = map(lambda x: translate_longopt(x[0]),
+ display_options)
# negative options are options that exclude other options
negative_opt = {'quiet': 'verbose'}
@@ -592,7 +592,7 @@ class Distribution:
for (opt, val) in option_order:
if val and is_display_option.get(opt):
- opt = string.translate (opt, longopt_xlate)
+ opt = translate_longopt(opt)
print getattr(self.metadata, "get_"+opt)()
any_display_options = 1
@@ -746,7 +746,7 @@ class Distribution:
for (option, (source, value)) in option_dict.items():
if DEBUG: print " %s = %s (from %s)" % (option, value, source)
try:
- bool_opts = command_obj.boolean_options
+ bool_opts = map(translate_longopt, command_obj.boolean_options)
except AttributeError:
bool_opts = []
try: