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.7

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.7
File Size Uploaded Provenance Actions
jam_build-0.7.7.tar.gz 122.9 kB With provenance Details for jam_build-0.7.7.tar.gz

Built distribution (wheel)

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

Total release size: 204.9 kB

Release files / jam_build-0.7.7.tar.gz

Download URL jam_build-0.7.7.tar.gz
Size 122.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ccf3225fc834026c0c73e451188614a3d3fc414ff4dd580370509d3d1ce72bb2
BLAKE2b-256 checksum
How to use checksums
488c79aa32d9d0df8cc23042bad50a0c4a0b61ca1c514948331865c754a0e2f6
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 9, 2026.

Transparency log

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

Download URL jam_build-0.7.7-py3-none-any.whl
Size 82.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a6a5c26606d728766d2701ecbbbc3a6a2a0de5855e29b58fd2f31aff9d9fbd6
BLAKE2b-256 checksum
How to use checksums
7642c1cbd9ea4f7adf7862d98877d694815d77f15abcb530d9075dbc89a0f7a5
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 9, 2026.

Transparency log

Security for jam-build 0.7.7

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.7.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 9, 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