+1 -1 +14
Vote on this proposal

Introduction to SCons

by Maninya M (speaking)

Section
Software Development Tools
Technical level
Intermediate

Objective

Attendees will learn how using SCons can help them greatly improve the build mechanism for their software, especially if they use make, and also, how easy it is to learn.

Audience

Developers (need not be experts in Python) interested in using a powerful build tool written in Python, that has many advantages over the legacy make tool and more besides.

Description

SCons is an open-source software construction tool, also known as build system, written in Python. It involves writing Python scripts or “configuration files”, to describe build environments and dependencies. For those familiar with linux, SCons could serve as a replacement to the whole GNU build system (autoconf, automake). Imagine reading elegant Python code to understand where your build went wrong instead of deciphering make commands!

Detailed Abstract

Why should you use SCons?

SCons gives you the power of a full-fledged programming language. So you can make it do pretty much anything you can write in Python. It’s going to be far easier to understand, learn and extend. There are more advantages.

  • not tied to the external environment, hence easily reproducible
  • more reliable - can use MD5 signatures to detect file changes
  • automatic dependency analysis
  • support for many platforms, compilers, and targets built-in.
  • No need to reinvent the wheel, use already available Python functions

Basic Concepts

SCons environment

SCons does not import any settings from the system environment, such as compiler flags or include paths, implicitly. This is so that it is reproducible in different environments and behaves in a predictable manner. Any such flags or paths need to be imported in the SConscripts explicitly.

Builder objects

These are the fundamental components in SCons. They are called from SConscripts to build a set of dependent targets from the source files. They may use Scanner objects internally to scan source files for additional dependencies (like #includes).

Use pre-packaged builders and write your own

SCons comes with pre-written builders for C/C++ and Java. You can import Python modules in your SConscripts. And if all that’s not enough, you could easily write your own builder methods!

Outline

  • Why SCons and what is it? (5min)

    • What a good build tool does
    • Difficulties with make/other tools
    • How SCons is awesome (small examples)
  • Basic Concepts (8min)

    • SConscripts, SConstructs, Builders and Scanners
    • Build a simple program with SCons
  • How does it work? (8min)

    • Overview of how SCons process works
    • Some common tasks in SCons (example programs/snippets)
  • Some history and some facts (4min)

    • Who wrote SCons?
    • Who out there uses SCons?
  • Questions (5min)

Requirements

Python >= 2.4 and < 3.

Speaker bio

Maninya is an R&D Engineer in the developer productivity tools team at DreamWorks Animation, India. She creates and manages developer workflows in the studio build infrastructure that uses SCons and also trains developers on the same. She graduated with an M.Tech in Information Technology from IIIT-Bangalore.

Comments


  • 1

    [-] Aravind Krishnaswamy 229 days ago

    Could you please provide links to videos and slides of previous sessions that you have spoken at ? Thanks!

Login with Twitter or Google to leave a comment →