4Suite API Documentation

Module Ft.Lib.DistExt.BuildScripts

Classes:
Functions:
Fields:

Classes

class BuildScripts(distutils.cmd.Command)

Methods

build_executable(self, executable)
Builds a compiled executable. For all systems, the executable is created in the same fashion as the Python interpreter executable.
build_executable_script(self, exec_script)
Builds a hand-written shell script. On POSIX systems, this is nothing more than a file copy. For Windows, the executable stub has the contents of the script file appended to the end of the stub.
build_script(self, script)
Builds a CommandLineApp script. On POSIX systems, this is a generated shell script. For Windows, it is a compiled executable with the generated file appended to the end of the stub.
get_script_filename(self, script)
Convert the name of a script into the name of the file which it will be run from.
run(self)
Create the proper script for the current platform.
write_script(self, script, script_body, extra_sources=None)

Methods inherited from class distutils.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

Fields

boolean_options = ['force', 'debug']
command_name = 'build_scripts'
description = '"build" scripts'
help_options = [('help-compiler', None, 'list available compilers', <function show_compilers>)]
stub_name = 'stubmain'
user_options = [('build-dir=', 'd', 'directory to "build" (copy) to'), ('build-temp=', 't', 'directory for temporary files (build by-products)'), ('force', 'f', 'forcibly build everything (ignore file timestamps'), ('debug', 'g', 'compile/link with debugging information'), ('compiler=', 'c', 'specify the compiler type')]

Fields

Functions

new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0)
Generate an instance of some CCompiler subclass for the supplied platform/compiler combination. 'plat' defaults to 'os.name' (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler for that platform. Currently only 'posix' and 'nt' are supported, and the default compilers are "traditional Unix interface" (UnixCCompiler class) and Visual C++ (MSVCCompiler class). Note that it's perfectly possible to ask for a Unix compiler object under Windows, and a Microsoft compiler object under Unix -- if you supply a value for 'compiler', 'plat' is ignored.
newer(source, target)
Return true if 'source' exists and is more recently modified than 'target', or if 'source' exists and 'target' doesn't. Return false if both exist and 'target' is the same age or younger than 'source'. Raise DistutilsFileError if 'source' does not exist.
newer_group(sources, target, missing='error')
Return true if 'target' is out-of-date with respect to any file listed in 'sources'. In other words, if 'target' exists and is newer than every file in 'sources', return false; otherwise return true. 'missing' controls what we do when a source file is missing; the default ("error") is to blow up with an OSError from inside 'stat()'; if it is "ignore", we silently drop any missing source files; if it is "newer", any missing source files make us assume that 'target' is out-of-date (this is handy in "dry-run" mode: it'll make you pretend to carry out commands that wouldn't work because inputs are missing, but that doesn't matter because you're not actually going to run the commands).
Print list of available compilers (used by the "--help-compiler" options to "build", "build_ext", "build_clib").

Fields

COMMAND_LINE_APP_BODY = '# script generated in Ft.Lib.DistExt.BuildScripts\n%(import_stmt)s\n%(classname)s().run()\n'
SHELL_SCRIPT_HEAD = "#!%(env_executable)s%(env_args)s%(py_executable)..._module('Ft', *module_info)\n\n### SCRIPT BODY ###\n"
STUB_MAIN_SOURCE = 'build/lib.linux-i686-2.3/Ft/Lib/DistExt/stubmain.c'