Chapter 5. Native Python Interface

The "Native Python" interface is the interface that the actual SCons utility will present to users. Because it exposes the Python Build Engine API, SCons users will have direct access to the complete functionality of the Build Engine. In contrast, a different user interface such as a GUI may choose to only use, and present to the end-user, a subset of the Build Engine functionality.

5.1. Configuration files

SCons configuration files are simply Python scripts that invoke methods to specify target files to be built, rules for building the target files, and dependencies. Common build rules are available by default and need not be explicitly specified in the configuration files.

By default, the SCons utility searches for a file named SConstruct, Sconstruct, sconstruct, SConstruct.py, Sconstruct.py or sconstruct.py (in that order) in the current directory, and reads its configuration from the first file found. A -f command-line option exists to read a different file name.