summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/command/command_template
blob: a12d32bfb33cfe2e3ae5cf31f7a3d15893261b06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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)