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

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

Built distribution (wheel)

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

Total release size: 205.3 kB

Release files / jam_build-0.7.8.tar.gz

Download URL jam_build-0.7.8.tar.gz
Size 123.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e28f65bde7ed23388e47b84fd65f3ac9bb2df29fd7b1092f342a05cce2456ac3
BLAKE2b-256 checksum
How to use checksums
14f4f23422a5fecb27f3ddd26412339dd0e9c8a147940b90b5dc192fdceb0507
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.8-py3-none-any.whl

Download URL jam_build-0.7.8-py3-none-any.whl
Size 82.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
972e5ffaff6d4d4ea5cf3747978b90839b9a5e441d8b422dcc6df37db5f5a2ca
BLAKE2b-256 checksum
How to use checksums
dcc43700239600d0c306c62164fd91d217049ff333d11c2d1e5365e3deddb3da
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.8

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