summaryrefslogtreecommitdiff
path: root/src/distutils2/command
diff options
context:
space:
mode:
authorZubin Mithra <zubin.mithra@gmail.com>2010-08-08 13:08:29 +0530
committerZubin Mithra <zubin.mithra@gmail.com>2010-08-08 13:08:29 +0530
commit9b3c8821ec4f8332a28583fee0e121ba918cf784 (patch)
treefaab2d463f0ab3191c4363a326769d9fec1ecb38 /src/distutils2/command
parent1131d55f1c1dae56903343433bb958a809f47c45 (diff)
downloaddisutils2-9b3c8821ec4f8332a28583fee0e121ba918cf784.tar.gz
longopt_xlate removed.
Diffstat (limited to 'src/distutils2/command')
-rw-r--r--src/distutils2/command/cmd.py3
-rw-r--r--src/distutils2/command/install.py5
2 files changed, 3 insertions, 5 deletions
diff --git a/src/distutils2/command/cmd.py b/src/distutils2/command/cmd.py
index 755d3c7..646f895 100644
--- a/src/distutils2/command/cmd.py
+++ b/src/distutils2/command/cmd.py
@@ -156,13 +156,12 @@ class Command(object):
def dump_options(self, header=None, indent=""):
- from distutils2.fancy_getopt import longopt_xlate
if header is None:
header = "command options for '%s':" % self.get_command_name()
self.announce(indent + header, level=log.INFO)
indent = indent + " "
for (option, _, _) in self.user_options:
- option = option.translate(longopt_xlate)
+ option = option.replace('-', '_')
if option[-1] == "=":
option = option[:-1]
value = getattr(self, option)
diff --git a/src/distutils2/command/install.py b/src/distutils2/command/install.py
index 588786f..fe76454 100644
--- a/src/distutils2/command/install.py
+++ b/src/distutils2/command/install.py
@@ -308,7 +308,6 @@ class install(Command):
def dump_dirs(self, msg):
"""Dumps the list of user options."""
- from distutils2.fancy_getopt import longopt_xlate
log.debug(msg + ":")
for opt in self.user_options:
opt_name = opt[0]
@@ -316,10 +315,10 @@ class install(Command):
opt_name = opt_name[0:-1]
if opt_name in self.negative_opt:
opt_name = self.negative_opt[opt_name]
- opt_name = opt_name.translate(longopt_xlate)
+ opt_name = opt_name.replace('-', '_')
val = not getattr(self, opt_name)
else:
- opt_name = opt_name.translate(longopt_xlate)
+ opt_name = opt_name.replace('-', '_')
val = getattr(self, opt_name)
log.debug(" %s: %s" % (opt_name, val))