Package distutils :: Package command :: Module build_py :: Class build_py
[hide private]
[frames] | no frames]

_ClassType build_py

cmd.Command --+
              |
             build_py

Instance Methods [hide private]
 
initialize_options(self)
Set default values for all the options that this command supports.
 
finalize_options(self)
Set final values for all the options that this command supports.
 
run(self)
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()'.
 
get_data_files(self)
Generate list of '(package,src_dir,build_dir,filenames)' tuples
 
find_data_files(self, package, src_dir)
Return filenames for package's data files in 'src_dir'
 
build_package_data(self)
Copy data files into build directory
 
get_package_dir(self, package)
Return the directory, relative to the top of the source distribution, where package 'package' should be found (at least according to the 'package_dir' option, if any).
 
check_package(self, package, package_dir)
 
check_module(self, module, module_file)
 
find_package_modules(self, package, package_dir)
 
find_modules(self)
Finds individually-specified Python modules, ie.
 
find_all_modules(self)
Compute the list of all modules that will be built, whether they are specified one-module-at-a-time ('self.py_modules') or by whole packages ('self.packages').
 
get_source_files(self)
 
get_module_outfile(self, build_dir, package, module)
 
get_outputs(self, include_bytecode=1)
 
build_module(self, module, module_file, package)
 
build_modules(self)
 
build_packages(self)
 
byte_compile(self, files)

Inherited from cmd.Command: __getattr__, __init__, announce, copy_file, copy_tree, debug_print, dump_options, ensure_dirname, ensure_filename, ensure_finalized, ensure_string, ensure_string_list, execute, get_command_name, get_finalized_command, get_sub_commands, make_archive, make_file, mkpath, move_file, reinitialize_command, run_command, set_undefined_options, spawn, warn

Class Variables [hide private]
  description = '"build" pure Python modules (copy to build dire...
  user_options = [('build-lib=', 'd', 'directory to "build" (cop...
  boolean_options = ['compile', 'force']
  negative_opt = {'no-compile': 'compile'}

Inherited from cmd.Command: sub_commands

Method Details [hide private]

initialize_options(self)

 

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.

Overrides: cmd.Command.initialize_options
(inherited documentation)

finalize_options(self)

 

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.

Overrides: cmd.Command.finalize_options
(inherited documentation)

run(self)

 

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.

Overrides: cmd.Command.run
(inherited documentation)

find_modules(self)

 

Finds individually-specified Python modules, ie. those listed by module name in 'self.py_modules'. Returns a list of tuples (package, module_base, filename): 'package' is a tuple of the path through package-space to the module; 'module_base' is the bare (no packages, no dots) module name, and 'filename' is the path to the ".py" file (relative to the distribution root) that implements the module.

find_all_modules(self)

 

Compute the list of all modules that will be built, whether they are specified one-module-at-a-time ('self.py_modules') or by whole packages ('self.packages'). Return a list of tuples (package, module, module_file), just like 'find_modules()' and 'find_package_modules()' do.


Class Variable Details [hide private]

description

Value:
'"build" pure Python modules (copy to build directory)'

user_options

Value:
[('build-lib=', 'd', 'directory to "build" (copy) to'),
 ('compile', 'c', 'compile .py to .pyc'),
 ('no-compile', None, 'don\'t compile .py files [default]'),
 ('optimize=',
  'O',
  'also compile with optimization: -O1 for "python -O", -O2 for "pytho\
n -OO", and -O0 to disable [default: -O0]'),
 ('force', 'f', 'forcibly build everything (ignore file timestamps)')]