diff options
Diffstat (limited to 'Lib/distutils/core.py')
-rw-r--r-- | Lib/distutils/core.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index 08a1d64..025e1c0 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -638,6 +638,13 @@ class Distribution: not self.has_ext_modules() and not self.has_c_libraries()) + def get_name (self): + return self.name or "UNKNOWN" + + def get_full_name (self): + return "%s-%s" % ((self.name or "UNKNOWN"), (self.version or "???")) + + # class Distribution @@ -887,7 +894,7 @@ class Command: """Find or create the command object for 'command', and return its 'option' option.""" - cmd_obj = self.distribution.find_command_obj (command) + cmd_obj = self.find_peer (command) return cmd_obj.get_option (option) @@ -939,12 +946,13 @@ class Command: def copy_file (self, infile, outfile, - preserve_mode=1, preserve_times=1, level=1): + preserve_mode=1, preserve_times=1, link=None, level=1): """Copy a file respecting verbose, dry-run and force flags.""" return util.copy_file (infile, outfile, preserve_mode, preserve_times, not self.force, + link, self.verbose >= level, self.dry_run) @@ -976,6 +984,12 @@ class Command: self.dry_run) + def make_archive (self, base_name, format, + root_dir=None, base_dir=None): + util.make_archive (base_name, format, root_dir, base_dir, + self.verbose, self.dry_run) + + def make_file (self, infiles, outfile, func, args, exec_msg=None, skip_msg=None, level=1): |