Attachment 'reference.html'
DownloadTable of Contents
Abstract
This reference lists all the variables that are used within the “cpython” tool, and the available builders. It is intended for SCons tool developers and core programmers, as a normal user you should read the manual instead.
Internally, the builder is based on the
Install/InstallAs methods from
SCons.Tool.install. It makes use of the basic builder's
functions: installFunc(), and
add_targets_to_INSTALLED_FILES().
The “InstallPython” method creates
.pyc or .pyo files for
.py source files and adds them to the list of targets
along with the source files. They are later copied to the destination
(target) directory.
Example:
env = Environment()
hello = File('hello.py')
env.InstallPython('/usr/local/bin/', hello)
env.Alias('install', '/usr/local/bin/')
- CPYTHON_PYC
Default value is
1, which means that the Python source files get compiled to.pycfiles. Set this variable to0in order to get optimized.pyofiles, parallel to your installed sources.- CPYTHON_EXE
The path to the external Python executable, used for creating optimized
.pyofiles. Default value is 'python'.- CPYTHON_PYO_FLAGS
Additional flags for compiling optimized Python files (
.pyo). The default is '-O'.- CPYTHON_PYO_CMD
The command arguments for compiling optimized Python files (
.pyo). The default value is '-c 'import sys,py_compile; [py_compile.compile(i) for i in sys.argv[1:]]''.- CPYTHON_PYCOM
The command line for compiling optimized Python files (
.pyo). Default is '$CPYTHON_EXE $CPYTHON_PYO_FLAGS $CPYTHON_PYO_CMD'.- CPYTHON_PYCOMSTR
The message string for the '
CPYTHON_PYCOM' command. Default is 'Install file: "$SOURCE" as "$TARGET"'.- CPYTHON_SUFFIX
Default value is '.py'. The suffix for Python source files.
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.- [get | view] (2013-03-30 18:18:02, 5.7 KB) [[attachment:manual.html]]
- [get | view] (2013-03-30 18:18:02, 6.5 KB) [[attachment:manual.pdf]]
- [get | view] (2013-03-30 18:18:02, 4.8 KB) [[attachment:reference.html]]
- [get | view] (2013-03-30 18:18:02, 5.6 KB) [[attachment:reference.pdf]]
You are not allowed to attach a file to this page.
