diff options
author | Greg Ward <gward@python.net> | 1999-09-13 03:03:01 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 1999-09-13 03:03:01 (GMT) |
commit | 1ae32466792dde8eab7cafc933f1dbb5984847f6 (patch) | |
tree | de8f50ba384c7d0c5be2aee1847359bfaa8b6da3 /Lib/distutils/core.py | |
parent | 81ffe75d1c89584efd43040e3c9c7b006dde6942 (diff) | |
download | cpython-1ae32466792dde8eab7cafc933f1dbb5984847f6.zip cpython-1ae32466792dde8eab7cafc933f1dbb5984847f6.tar.gz cpython-1ae32466792dde8eab7cafc933f1dbb5984847f6.tar.bz2 |
Fixed some goofs in 'alias_options'.
Error message tweak in Command.set_option().
Added Command.get_peer_option().
Added Command.move_file() wrapper.
Diffstat (limited to 'Lib/distutils/core.py')
-rw-r--r-- | Lib/distutils/core.py | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index 8d2572a..a6c378d 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -120,9 +120,10 @@ class Distribution: # 'options' dictionary. These aliases are for those common, essential # options. alias_options = { 'py_modules': ('build_py', 'modules'), - 'ext_modules': ('build_ext', 'modules'), + 'ext_modules': ('build_ext', 'extensions'), 'package': [('build_py', 'package',), ('build_ext', 'package')], + 'include_dirs': ('build_ext', 'include_dirs'), } @@ -624,7 +625,7 @@ class Command: if not hasattr (self, option): raise DistutilsOptionError, \ - "command %s: no such option %s" % \ + "command '%s': no such option '%s'" % \ (self.get_command_name(), option) if value is not None: setattr (self, option, value) @@ -701,6 +702,11 @@ class Command: cmd_obj.set_final_options () + def get_peer_option (self, command, option): + cmd_obj = self.distribution.find_command_obj (command) + return cmd_obj.get_option (option) + + def run_peer (self, command): """Run some other command: uses the 'run_command()' method of Distribution, which creates the command object if necessary @@ -767,6 +773,13 @@ class Command: self.distribution.dry_run) + def move_file (self, src, dst, level=1): + """Move a file respecting verbose and dry-run flags.""" + return util.move_file (src, dst, + self.distribution.verbose >= level, + self.distribution.dry_run) + + def make_file (self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): |