diff options
Diffstat (limited to 'setuptools/dist.py')
-rw-r--r-- | setuptools/dist.py | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py index fc0f3eba..8fcd19ea 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -372,10 +372,19 @@ class Distribution(_Distribution): self.global_options = self.__class__.global_options self.negative_opt = self.__class__.negative_opt - # Handle commands that want to consume all remaining arguments + # First, expand any aliases command = args[0] + aliases = self.get_option_dict('aliases') + while command in aliases: + src,alias = aliases[command] + del aliases[command] # ensure each alias can expand only once! + import shlex + args[:1] = shlex.split(alias,True) + command = args[0] + nargs = _Distribution._parse_command_opts(self, parser, args) + # Handle commands that want to consume all remaining arguments cmd_class = self.get_command_class(command) if getattr(cmd_class,'command_consumes_arguments',None): self.get_option_dict(command)['args'] = ("command line", nargs) @@ -384,6 +393,21 @@ class Distribution(_Distribution): return nargs + + + + + + + + + + + + + + + def has_dependencies(self): return not not self.requires @@ -408,6 +432,23 @@ class Distribution(_Distribution): self.have_run['install'] = 1 setuptools.bootstrap_install_from = None + + + + + + + + + + + + + + + + + def get_cmdline_options(self): """Return a '{cmd: {opt:val}}' map of all command-line options |