A build automation tool for Python projects that uses dependency-based tasks and a plugin system to define build life cycles.
SCons/scons
SCons is a Python-based software construction tool that determines what needs rebuilding and runs the commands to build it.
- Stars
- 2,438
- Forks
- 363
- Open issues
- 647
- Last commit
- 4 days ago
What is it?
SCons orchestrates the building of software and other products such as documentation by working out which components are out of date and invoking the commands needed to rebuild them. Its build configuration files are ordinary Python scripts, so build logic can use a full programming language instead of a separate domain-specific syntax.
Dependency analysis is built in for C, C++ and FORTRAN, and the tool includes builders for D, Java, Yacc, Lex, Qt, SWIG, TeX and LaTeX. Custom scanners and builders can be added for other languages or file types. Change detection uses cryptographic hashes by default, with timestamps available as an option, and parallel builds and a shared build cache are supported.
SCons is designed for cross-platform builds and runs on Linux, other POSIX systems, Windows, macOS and OS/2. It is installed with pip and requires Python 3.9 or higher.
Key features
- 01Build configuration written as Python scripts rather than a custom DSL.
- 02Built-in dependency analysis for C, C++ and FORTRAN, with extensible scanners.
- 03Built-in builders for D, Java, Qt, SWIG, Yacc, Lex, TeX and LaTeX.
- 04Change detection via cryptographic hashes, with optional timestamp mode.
- 05Parallel builds and a shared build cache.
- 06Cross-platform support including Windows, Linux, macOS and other POSIX systems.
Use cases
- Building C or C++ projects that need automatic header dependency tracking.
- Creating a single build script that coordinates code generation, compilation and documentation.
- Cross-platform builds that must run on both Windows and POSIX systems.
- Generating Visual Studio project files from a SCons build definition.
Quick start
- 1
Install SCons with pip
python -m pip install --user scons - 2
Read the first chapters of the SCons User Guide
Things to know
- Requires Python 3.9 or higher.
- On Windows, the scons executable may need its Python Scripts directory added to PATH.
Topics
FAQ
- What is scons?
- SCons is a Python-based software construction tool that determines what needs rebuilding and runs the commands to build it. SCons orchestrates the building of software and other products such as documentation by working out which components are out of date and invoking the commands needed to rebuild them. Its build configuration files are ordinary Python scripts, so build logic can use a full programming language instead of a separate domain-specific syntax.
- Is scons free to use? What license does it have?
- scons is open source under the MIT license. Check the license terms before using it in commercial products.
- Is scons still maintained?
- Actively maintained. The last commit to scons was on Nov 3, 2026.
- What can I use scons for?
- Building C or C++ projects that need automatic header dependency tracking. Creating a single build script that coordinates code generation, compilation and documentation. Cross-platform builds that must run on both Windows and POSIX systems. Generating Visual Studio project files from a SCons build definition.
- How do I install scons?
- Install SCons with pip: python -m pip install --user scons Read the first chapters of the SCons User Guide
- Where can I get scons?
- The source code and installation instructions are on GitHub: https://github.com/SCons/scons
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A Python task runner and build tool that defines tasks as plain Python functions and skips work that is already up-to-date.
Python-based tool for repeatable assembly and deployment of applications built from Python distributions and other systems.
A complete toolchain for building, packaging, and publishing Electron desktop applications, from project scaffolding to release.
A strict, opinionated flake8 plugin that enforces consistent, simple Python code style and flags complex code patterns.
A compiler cache for Rust, C/C++ and CUDA that restores matching build outputs across worktrees and CI runs instead of rebuilding them.