class documentation

Undocumented

Method add_defaults Add all the default files to self.filelist: - README or README.txt - setup.py - tests/test*.py and test/test*.py - all pure Python modules mentioned in setup script - all files pointed by package_data (build_py) - all files defined in data_files...
Method check_metadata Deprecated API.
Method checking_metadata Callable used for the check sub-command.
Method finalize_options Set final values for all the options that this command supports. This is always called as late as possible, ie. after any option assignments from the command-line or from other commands have been done...
Method get_archive_files Return the list of archive files created when the command was run, or None if the command hasn't run yet.
Method get_file_list Figure out the list of files to include in the source distribution, and put it in 'self.filelist'. This might involve reading the manifest template (and writing the manifest), or just reading the manifest, or just using the default file set -- it all depends on the user's options.
Method initialize_options Set default values for all the options that this command supports. Note that these defaults may be overridden by other commands, by the setup script, by config files, or by the command-line. Thus, this is not the place to code dependencies between options; generally, 'initialize_options()' implementations are just a bunch of "self...
Method make_distribution Create the source distribution(s). First, we create the release tree with 'make_release_tree()'; then, we create all required archive files (according to 'self.formats') from the release tree. Finally, we clean up by blowing away the release tree (unless 'self...
Method make_release_tree Create the directory tree that will become the source distribution archive. All directories implied by the filenames in 'files' are created under 'base_dir', and then we hard link or copy (if hard linking is unavailable) those files into place...
Method prune_file_list Prune off branches that might slip into the file list as created by 'read_template()', but really don't belong there: * the build tree (typically "build") * the release tree itself (only an issue if we ran "sdist" previously with --keep-temp, or it aborted) * any RCS, CVS,...
Method read_manifest Read the manifest file (named by 'self.manifest') and use it to fill in 'self.filelist', the list of files to include in the source distribution.
Method read_template Read and parse manifest template file named by self.template.
Method run A command's raison d'etre: carry out the action it exists to perform, controlled by the options initialized in 'initialize_options()', customized by other commands, the setup script, the command-line, and config files, and finalized in 'finalize_options()'...
Method write_manifest Write the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'.
Constant READMES Undocumented
Class Variable boolean_options Undocumented
Class Variable description Undocumented
Class Variable help_options Undocumented
Class Variable negative_opt Undocumented
Class Variable sub_commands Undocumented
Class Variable user_options Undocumented
Instance Variable archive_files Undocumented
Instance Variable dist_dir Undocumented
Instance Variable filelist Undocumented
Instance Variable force_manifest Undocumented
Instance Variable formats Undocumented
Instance Variable group Undocumented
Instance Variable keep_temp Undocumented
Instance Variable manifest Undocumented
Instance Variable manifest_only Undocumented
Instance Variable metadata_check Undocumented
Instance Variable owner Undocumented
Instance Variable prune Undocumented
Instance Variable template Undocumented
Instance Variable use_defaults Undocumented
Static Method _cs_path_exists Case-sensitive path existence check
Method _add_defaults_c_libs Undocumented
Method _add_defaults_data_files Undocumented
Method _add_defaults_ext Undocumented
Method _add_defaults_optional Undocumented
Method _add_defaults_python Undocumented
Method _add_defaults_scripts Undocumented
Method _add_defaults_standards Undocumented
Method _manifest_is_not_generated Undocumented

Inherited from Command:

Method __getattr__ Undocumented
Method __init__ Create and initialize a new Command object. Most importantly, invokes the 'initialize_options()' method, which is the real initializer and depends on the actual command being instantiated.
Method announce Undocumented
Method copy_file Copy a file respecting verbose, dry-run and force flags. (The former two default to whatever is in the Distribution object, and the latter defaults to false for commands that don't define it.)
Method copy_tree Copy an entire directory tree respecting verbose, dry-run, and force flags.
Method debug_print Print 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true.
Method dump_options Undocumented
Method ensure_dirname Undocumented
Method ensure_filename Ensure that 'option' is the name of an existing file.
Method ensure_finalized Undocumented
Method ensure_string Ensure that 'option' is a string; if not defined, set it to 'default'.
Method ensure_string_list Ensure that 'option' is a list of strings. If 'option' is currently a string, we split it either on /,\s*/ or /\s+/, so "foo bar baz", "foo,bar,baz", and "foo, bar baz" all become ["foo", "bar", "baz"].
Method execute Undocumented
Method get_command_name Undocumented
Method get_finalized_command Wrapper around Distribution's 'get_command_obj()' method: find (create if necessary and 'create' is true) the command object for 'command', call its 'ensure_finalized()' method, and return the finalized command object.
Method get_sub_commands Determine the sub-commands that are relevant in the current distribution (ie., that need to be run). This is based on the 'sub_commands' class attribute: each tuple in that list may include a method that we call to determine if the subcommand needs to be run for the current distribution...
Method make_archive Undocumented
Method make_file Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'...
Method mkpath Undocumented
Method move_file Move a file respecting dry-run flag.
Method reinitialize_command Undocumented
Method run_command Run some other command: uses the 'run_command()' method of Distribution, which creates and finalizes the command object if necessary and then invokes its 'run()' method.
Method set_undefined_options Set the values of any "undefined" options from corresponding option values in some other command object. "Undefined" here means "is None", which is the convention used to indicate that an option has not been changed between 'initialize_options()' and 'finalize_options()'...
Method spawn Spawn an external command respecting dry-run flag.
Method warn Undocumented
Instance Variable distribution Undocumented
Instance Variable finalized Undocumented
Instance Variable force Undocumented
Instance Variable help Undocumented
Instance Variable verbose Undocumented
Method _ensure_stringlike Undocumented
Method _ensure_tested_string Undocumented
Instance Variable _dry_run Undocumented
def add_defaults(self): (source)

Add all the default files to self.filelist: - README or README.txt - setup.py - tests/test*.py and test/test*.py - all pure Python modules mentioned in setup script - all files pointed by package_data (build_py) - all files defined in data_files. - all files defined as scripts. - all C sources listed as part of extensions or C libraries in the setup script (doesn't catch C headers!) Warns if (README or README.txt) or setup.py are missing; everything else is optional.

def check_metadata(self): (source)

Deprecated API.

def checking_metadata(self): (source)

Callable used for the check sub-command. Placed here so user_options can view it

def finalize_options(self): (source)

Set final values for all the options that this command supports. This is always called as late as possible, ie. after any option assignments from the command-line or from other commands have been done. Thus, this is the place to code option dependencies: if 'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as long as 'foo' still has the same value it was assigned in 'initialize_options()'. This method must be implemented by all command classes.

def get_archive_files(self): (source)

Return the list of archive files created when the command was run, or None if the command hasn't run yet.

def get_file_list(self): (source)

Figure out the list of files to include in the source distribution, and put it in 'self.filelist'. This might involve reading the manifest template (and writing the manifest), or just reading the manifest, or just using the default file set -- it all depends on the user's options.

def initialize_options(self): (source)

Set default values for all the options that this command supports. Note that these defaults may be overridden by other commands, by the setup script, by config files, or by the command-line. Thus, this is not the place to code dependencies between options; generally, 'initialize_options()' implementations are just a bunch of "self.foo = None" assignments. This method must be implemented by all command classes.

def make_distribution(self): (source)

Create the source distribution(s). First, we create the release tree with 'make_release_tree()'; then, we create all required archive files (according to 'self.formats') from the release tree. Finally, we clean up by blowing away the release tree (unless 'self.keep_temp' is true). The list of archive files created is stored so it can be retrieved later by 'get_archive_files()'.

def make_release_tree(self, base_dir, files): (source)

Create the directory tree that will become the source distribution archive. All directories implied by the filenames in 'files' are created under 'base_dir', and then we hard link or copy (if hard linking is unavailable) those files into place. Essentially, this duplicates the developer's source tree, but in a directory named after the distribution, containing only the files to be distributed.

def prune_file_list(self): (source)

Prune off branches that might slip into the file list as created by 'read_template()', but really don't belong there: * the build tree (typically "build") * the release tree itself (only an issue if we ran "sdist" previously with --keep-temp, or it aborted) * any RCS, CVS, .svn, .hg, .git, .bzr, _darcs directories

def read_manifest(self): (source)

Read the manifest file (named by 'self.manifest') and use it to fill in 'self.filelist', the list of files to include in the source distribution.

def read_template(self): (source)

Read and parse manifest template file named by self.template. (usually "MANIFEST.in") The parsing and processing is done by 'self.filelist', which updates itself accordingly.

def run(self): (source)

A command's raison d'etre: carry out the action it exists to perform, controlled by the options initialized in 'initialize_options()', customized by other commands, the setup script, the command-line, and config files, and finalized in 'finalize_options()'. All terminal output and filesystem interaction should be done by 'run()'. This method must be implemented by all command classes.

def write_manifest(self): (source)

Write the file list in 'self.filelist' (presumably as filled in by 'add_defaults()' and 'read_template()') to the manifest file named by 'self.manifest'.

READMES: tuple[str, ...] = (source)

Undocumented

Value
('README', 'README.txt', 'README.rst')
boolean_options: list[str] = (source)

Undocumented

description: str = (source)

Undocumented

help_options = (source)

Undocumented

negative_opt: dict[str, str] = (source)

Undocumented

user_options = (source)

Undocumented

archive_files = (source)

Undocumented

dist_dir: str = (source)

Undocumented

filelist = (source)

Undocumented

force_manifest: int = (source)

Undocumented

Undocumented

Undocumented

keep_temp: int = (source)

Undocumented

manifest: str = (source)

Undocumented

manifest_only: int = (source)

Undocumented

metadata_check: int = (source)

Undocumented

Undocumented

Undocumented

template: str = (source)

Undocumented

use_defaults: int = (source)

Undocumented

@staticmethod
def _cs_path_exists(fspath): (source)

Case-sensitive path existence check >>> sdist._cs_path_exists(__file__) True >>> sdist._cs_path_exists(__file__.upper()) False

def _add_defaults_c_libs(self): (source)

Undocumented

def _add_defaults_data_files(self): (source)

Undocumented

def _add_defaults_ext(self): (source)

Undocumented

def _add_defaults_optional(self): (source)

Undocumented

def _add_defaults_python(self): (source)

Undocumented

def _add_defaults_scripts(self): (source)

Undocumented

def _add_defaults_standards(self): (source)

Undocumented

def _manifest_is_not_generated(self): (source)

Undocumented