Distutils can be extended in various ways. Most extensions take the form of new commands or replacements for existing commands. New commands may be written to support new types of platform-specific packaging, for example, while replacements for existing commands may be made to modify details of how the command operates on a package.
Most extensions of the distutils are made within setup.py scripts that want to modify existing commands; many simply add a few file extensions that should be copied into packages in addition to .py files as a convenience.
Most distutils command implementations are subclasses of the Command class from distutils.cmd. New commands may directly inherit from Command, while replacements often derive from Command indirectly, directly subclassing the command they are replacing. Commands are required to derive from Command.