SCons

SCons
Original authorSteven Knight
ReleaseDecember 13, 2001; 24 years ago (2001-12-13)
Stable release
4.11.1 / August 27, 2026; 3 months ago (2026-08-27)
Written inPython
Operating systemCross-platform
TypeSoftware development tools
LicenseMIT License
Websitescons.org
Repositorygithub.com/SCons/scons

SCons is a software development tool that analyzes source code dependencies and operating system adaptation requirements from a software project description and generates final binary executables for installation on the target operating system platform. Its function is similar to the more popular GNU build system.

The tool generates Python scripts for project configuration and build logic.

History

The Cons software construction utility, written in Perl, was created by Bob Sidebotham in 1999. It served as a base for the ScCons build tool, a design which won the Software Carpentry project SC Build competition in August 2000. ScCons was the foundation for SCons.

SCons inspired the creation of Waf, formerly known as SCons/BKsys, which emerged in the KDE community. For some time, there were plans to use it as the build tool for KDE 4 and beyond, but that effort was abandoned in favor of CMake.

Notable projects that use SCons (or used it at one time) include: The Battle for Wesnoth, Doom 3, gem5, gpsd, GtkRadiant, Madagascar, Nullsoft Scriptable Install System, OpenNebula, Wolfenstein: Enemy Territory, XORP and MCA2, openpilot and Godot.

.csig is the SCons Content Signature file format.

Features

Major features include:

Examples

The following is an SConstruct file that builds a hello world C program using the default platform compiler:

Program("hello-world.c")

The following is a SConstruct file for a project that includes two source files and specifies build tool options:

env = Environment()
env.Append(CPPFLAGS=["-Wall", "-g"])
env.Program("hello", ["hello.c", "main.c"])

See also