mirror of
https://github.com/python/cpython.git
synced 2026-04-05 03:21:05 +00:00
initial import of the packaging package in the standard library
This commit is contained in:
parent
566f8a646e
commit
1231a4e097
193 changed files with 30376 additions and 149 deletions
35
Lib/packaging/command/command_template
Normal file
35
Lib/packaging/command/command_template
Normal file
|
|
@ -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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue