|
14 | 14 | from copy import copy |
15 | 15 | from distutils.errors import * |
16 | 16 | from distutils import sysconfig |
17 | | -from distutils.fancy_getopt import FancyGetopt, longopt_xlate |
| 17 | +from distutils.fancy_getopt import FancyGetopt, translate_longopt |
18 | 18 | from distutils.util import check_environ, strtobool |
19 | 19 |
|
20 | 20 |
|
@@ -86,8 +86,8 @@ class Distribution: |
86 | 86 | ('long-description', None, |
87 | 87 | "print the long package description"), |
88 | 88 | ] |
89 | | - display_option_names = map(lambda x: string.translate(x[0], longopt_xlate), |
90 | | - display_options) |
| 89 | + display_option_names = map(lambda x: translate_longopt(x[0]), |
| 90 | + display_options) |
91 | 91 |
|
92 | 92 | # negative options are options that exclude other options |
93 | 93 | negative_opt = {'quiet': 'verbose'} |
@@ -592,7 +592,7 @@ def handle_display_options (self, option_order): |
592 | 592 |
|
593 | 593 | for (opt, val) in option_order: |
594 | 594 | if val and is_display_option.get(opt): |
595 | | - opt = string.translate (opt, longopt_xlate) |
| 595 | + opt = translate_longopt(opt) |
596 | 596 | print getattr(self.metadata, "get_"+opt)() |
597 | 597 | any_display_options = 1 |
598 | 598 |
|
@@ -746,7 +746,7 @@ def _set_command_options (self, command_obj, option_dict=None): |
746 | 746 | for (option, (source, value)) in option_dict.items(): |
747 | 747 | if DEBUG: print " %s = %s (from %s)" % (option, value, source) |
748 | 748 | try: |
749 | | - bool_opts = command_obj.boolean_options |
| 749 | + bool_opts = map(translate_longopt, command_obj.boolean_options) |
750 | 750 | except AttributeError: |
751 | 751 | bool_opts = [] |
752 | 752 | try: |
|
0 commit comments