diff options
author | Tarek Ziade <tarek@ziade.org> | 2011-05-19 11:07:25 (GMT) |
---|---|---|
committer | Tarek Ziade <tarek@ziade.org> | 2011-05-19 11:07:25 (GMT) |
commit | 1231a4e097e55c5ac793ddaedad23bfd610591e6 (patch) | |
tree | d473428e1161a617cd8949c365f5e08c85224bda /Lib/packaging/command/command_template | |
parent | 566f8a646e937c17ff5bc7a8abc7af3c332b66ec (diff) | |
download | cpython-1231a4e097e55c5ac793ddaedad23bfd610591e6.zip cpython-1231a4e097e55c5ac793ddaedad23bfd610591e6.tar.gz cpython-1231a4e097e55c5ac793ddaedad23bfd610591e6.tar.bz2 |
initial import of the packaging package in the standard library
Diffstat (limited to 'Lib/packaging/command/command_template')
-rw-r--r-- | Lib/packaging/command/command_template | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Lib/packaging/command/command_template b/Lib/packaging/command/command_template new file mode 100644 index 0000000..a12d32b --- /dev/null +++ b/Lib/packaging/command/command_template @@ -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) |