Skip to main content

Jam build system on Python

This is a Python reimplementation of the Jam build system (link).

Supported platforms: Linux (Unix), OpenVMS, Windows (ninja 1.14), MacOS

What is Jam

Jam is a build system (similar to meson, cmake, etc.). The key difference is that its core is essentially an interpreter for its internal language, with all building functionality written in this language.

The raw Jam language doesn't know how to build anything by itself, but it allows you to define rules and dependencies which construct the actual command sequence to build projects using a dependency tree.

Jam includes Jambase, which is a collection of generic rules to build C, C++ and Fortran projects. It can be easily extended (or modified) to support other types of projects.

Differences from the original Jam

  • Uses ninja, samurai or other ninja-compatible builders for the actual building of executables.
  • mkdir is a built-in command that collects all created directories to the dirs target.
  • Built-in rules are case-insensitive (Echo and ECHO are the same).
  • Regular expressions are Python-based.
  • Clean actions are ignored in favor of ninja -t clean.

Quick Start

Install:

# Using uv (easiest and recommmended) from PyPI
uv tool install jam-build@latest

# Install jamp with the system pip
pip3 install jam-build

# Or from the latest main branch.
pip3 install git+https://github.com/ildus/jamp

# Using pypy3 provides approximately twice the performance
# pypy3 -m pip install jam-build

Install ninja using your package manager

dnf install ninja
# or pacman -Syu ninja
# etc.

Example project structure with a library and a main executable that uses math functions:

src
    main.c
lib
    print.c
include
    common.h

Jamfile

Corresponding Jamfile:

HDRS = include ;                    # common includes, affects all sources
Library libprint : lib/print.c ;    # on Unix this will create libprint.a
Main app : src/main.c ;             # executable
LinkLibraries app : libprint ;      # linking the executable with our library
LINKLIBS on app = -lm ;             # extra libraries using paths

To build the executable, simply run:

jamp && ninja

For more complex examples, look at the tests directory. When dealing with subdirectories, it's recommended to use the SubDir rule. Note that this example will not work on VMS.

Contributing

git clone git@github.com:ildus/jamp.git

# To run without installing
export PYTHONPATH=$PYTHONPATH:<current_dir>/jamp/src
python3 -m jamp

# Testing changes
pip install pytest
cd <jamp root folder>
pytest

Documentation

See the docs directory.

OpenVMS Notes

Use my github.com/ildus/samurai fork for compilation. It supports the additional '$^' escape sequence for newlines, allowing you to add full scripts to build.ninja.

Metadata

Release files for jam-build 0.7.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jam-build 0.7.9
File Size Uploaded Provenance Actions
jam_build-0.7.9.tar.gz 123.6 kB With provenance Details for jam_build-0.7.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jam-build 0.7.9
File Interpreter ABI Platform Actions
jam_build-0.7.9-py3-none-any.whl Python 3 none any Details for jam_build-0.7.9-py3-none-any.whl

Total release size: 206.1 kB

Release files / jam_build-0.7.9.tar.gz

Download URL jam_build-0.7.9.tar.gz
Size 123.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4d956feb7c4fa1d78e86c0306831bc01b274bf4b464a2bbbd2a13e03323e127c
BLAKE2b-256 checksum
How to use checksums
d158d65dc74238f2d8607427c6e8876c3bed30af29667b9bd4edf2b1c7450ba9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Release files / jam_build-0.7.9-py3-none-any.whl

Download URL jam_build-0.7.9-py3-none-any.whl
Size 82.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0fb9783d0c43fcb520d22372626e8b0ee8bf84c7dc112c1bf5902f79bd4fdce
BLAKE2b-256 checksum
How to use checksums
74702f05eab1a6588ca5e32010f8e27b949108ed66534a9e37194ddaa50e1ab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

Security for jam-build 0.7.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for jam_build-0.7.9.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page