Mercurial > cpython-lru_cache-weakref
diff Lib/packaging/command/command_template @ 70194:1a31c3be88b1
initial import of the packaging package in the standard library
| author | Tarek Ziade <tarek@ziade.org> |
|---|---|
| date | Thu, 19 May 2011 13:07:25 +0200 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Lib/packaging/command/command_template Thu May 19 13:07:25 2011 +0200 @@ -0,0 +1,35 @@ +"""Do X and Y.""" + +from packaging import logger +from packaging.command.cmd import 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 = [ + ('', '', # long option, short option (one letter) or None + ""), # help text + ] + + def initialize_options(self): + self. = None + self. = None + self. = None + + def finalize_options(self): + if self.x is None: + self.x = ... + + def run(self): + ... + logger.info(...) + + if not self.dry_run: + ... + + self.execute(..., dry_run=self.dry_run)
