Clone wiki

SCons / DeveloperGuide / SourceWalkThrough

SCons Source Tree Walkthrough

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

When you first check out SCons, the main dirs you'll see are: [[!table header="no" class="mointable" data=""" src | the source doc | the documentation (man pages, guides, etc.) test | test suite www | the SCons web site """]]

The src dir is the one you probably care about. It's 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 scanning for includes)
    • 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)
    • Sig (the MD5 signature subsystem)
  • script (the "scons" script) Some key files in src/SCons:

  • lots of good stuff in here.

  • Node/ File() and Dir() nodes are defined here.