Development Toolchain documentation

Build and package research software reproducibly.

Use sigclear-develop to define programs and libraries, generate supporting documentation, and produce installable packages.

Overview

One process from source to package

Development Toolchain provides an SCons-based build workflow for C and Python research software. It can build programs and shared libraries, generate C headers and command manuals, install outputs, and create DEB or RPM packages on supported systems.

Before you begin: Install and activate SIGCLEAR, then run sglicense-check to verify your license.

Quick start

Build a Hello World program

Create a project directory containing these two files. The M prefix identifies a C source file as a command-line program and produces a binary with the sg prefix.

Mhelloworld.c

#include <stdio.h>

int main(void)
{
    printf("Hello, world!\n");
    return 0;
}

SConstruct

from program import *

SGBuild("sigclear-hello")

Build and run the program:

scons
./sghelloworld

The same build also generates the command manual sghelloworld.1.

Build targets

Build locally, install, or package

scons local

Build programs, libraries and manuals in the project.

scons install

Build and install the outputs under the selected prefix.

scons package

Create an installable package for the supported operating system.

Common options

Use debug=1 for a debug build, -j N for parallel execution, or prefix=/path with the install target.

Examples

Package a specialized workflow for delivery

The Lunar LPR analysis separates instrument loading and radar filtering into reusable Python workflow modules. Development Toolchain can compile these modules and build an installable package for collaborators, partners or clients.

Project structure

sigclear-lpr/
├── SConstruct
├── j01_lpr_load.py
└── j02_lpr_filt.py

Download the two modules from the Lunar LPR data-analysis example, then add this build definition:

SConstruct

from program import *

SGBuild(
    "sigclear-lpr",
    depend=[
        "sigclear-experiment",
        "sigclear-io",
        "sigclear-soig",
        "sigclear-dsp",
        "sigclear-plot"
    ],
    desc="Chang'E-4 Lunar Penetrating Radar workflow"
)

Build the package for the current supported system:

scons package

The resulting DEB or RPM contains the built workflow modules and declares the SIGCLEAR Packages they require. The Python source files remain in the development project.

Licenses for delivered solutions

A partner or client needs licenses for the SIGCLEAR products used by the delivered package. Packaging a customized solution does not redistribute the SIGCLEAR libraries or Programs as part of that package.

Extend the current workflow examples

Next steps

Evaluate it with a real research project