Michael Mera edited this page Nov 11, 2015 · 2 revisions

SCons Source Tree Walkthrough

Here's a quick introduction to the structure of the SCons repository.

When you first check out SCons, the main directories you will see are:

src the sources
doc the documentation (man pages, guides, etc)
test the test suite
www the old SCons website repository

The src directory is the one you probably care about. It is organized like this:

  • engine: the guts of SCons
    • SCons: the root of the SCons python module hierarchy
      • *.py: the python modules
      • * unit tests, discovered automatically; see TestingMethodology
      • Tool: Tool modules, e.g.,,
      • Scanner: Scanner modules for dependency scanning
      • Node: the Node object, the central filesystem abstraction for building the dependency graph
      • Script: in here has the main loop that parses SCons options and reads the SConstruct; it's what's called from the "scons" script
  • script: the "scons" wrapper script

Some key files in src/SCons:

  • SCons Environment class: the user way to communicate dependencies and construction information to the SCons engine
  • Node/ File() and Dir() nodes are defined here
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.