diff options
| author | ?ric Araujo <merwok@netwok.org> | 2010-10-22 10:01:25 +0200 |
|---|---|---|
| committer | ?ric Araujo <merwok@netwok.org> | 2010-10-22 10:01:25 +0200 |
| commit | 8f2fdfad831885fe5048fc0205b3b48dad54ea98 (patch) | |
| tree | 0099895a197be18ef375323addd280d605aeb49f /distutils2/command | |
| parent | caf804210f5b7c0217a66b144afb1b5a902cbe9a (diff) | |
| parent | f28cf3cfe3cd03111d2a636a75ce7985770b611d (diff) | |
| download | disutils2-8f2fdfad831885fe5048fc0205b3b48dad54ea98.tar.gz | |
Branch merge
Diffstat (limited to 'distutils2/command')
| -rw-r--r-- | distutils2/command/command_template | 43 |
1 files changed, 17 insertions, 26 deletions
diff --git a/distutils2/command/command_template b/distutils2/command/command_template index 50bbab7..abd1fa3 100644 --- a/distutils2/command/command_template +++ b/distutils2/command/command_template @@ -1,45 +1,36 @@ -"""distutils.command.x +"""Implementation of the 'x' command.""" -Implements the Distutils 'x' command. -""" +import logging +from distutils2.command.cmd import Command -# created 2000/mm/dd, John Doe -__revision__ = "$Id$" - -from distutils.core import Command - - -class x (Command): +class x(Command): # Brief (40-50 characters) description of the command description = "" # List of option tuples: long name, short name (None if no short # name), and help string. - user_options = [('', '', - ""), - ] + user_options = [ + ('', '', # long option, short option (one letter) or None + ""), # help text + ] - def initialize_options (self): + def initialize_options(self): self. = None self. = None self. = None - # initialize_options() - - - def finalize_options (self): + def finalize_options(self): if self.x is None: - self.x = - - # finalize_options() - - - def run (self): + self.x = ... + def run(self): + ... + logging.info(...) - # run() + if not self.dry_run: + ... -# class x + self.execute(..., dry_run=self.dry_run) |
