Jam Build System (based on Python)
Project description
Jam build system on Python
This is a Python reimplementation of the Jam build system (link).
Supported platforms: Linux (Unix), OpenVMS, Windows (WIP)
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,samuraior otherninja-compatible builders for the actual building of executables. mkdiris a built-in command that collects all created directories to thedirstarget.- Built-in rules are case-insensitive (
EchoandECHOare the same). - Regular expressions are Python-based.
Cleanactions are ignored in favor ofninja -t clean.
Quick Start
Install:
# 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 ; # system libraries
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 should work on Windows
and Linux (because of explicit paths), but 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jam_build-0.6.1.tar.gz.
File metadata
- Download URL: jam_build-0.6.1.tar.gz
- Upload date:
- Size: 120.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d55b8f28c3d145b2a9ec2484c1cabadcc146141db92cb432ea02093fdede069
|
|
| MD5 |
f9473d236ce9261f0a266309700f5afb
|
|
| BLAKE2b-256 |
69c68dbab707004cd68068714ed961f60f25304834b77c408b6810ddec0d9c33
|
Provenance
The following attestation bundles were made for jam_build-0.6.1.tar.gz:
Publisher:
pypi.yml on ildus/jamp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jam_build-0.6.1.tar.gz -
Subject digest:
6d55b8f28c3d145b2a9ec2484c1cabadcc146141db92cb432ea02093fdede069 - Sigstore transparency entry: 199871262
- Sigstore integration time:
-
Permalink:
ildus/jamp@6432e30a5f4c02eacd1201b2ed99d468231a0823 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/ildus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@6432e30a5f4c02eacd1201b2ed99d468231a0823 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jam_build-0.6.1-py3-none-any.whl.
File metadata
- Download URL: jam_build-0.6.1-py3-none-any.whl
- Upload date:
- Size: 79.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
584e2578e18f1939dc7c72ef2a3e6053bfcb5c1aa1b83c28f649cb4b494611e7
|
|
| MD5 |
0d89cd649fdf1122256198ab63ae92e6
|
|
| BLAKE2b-256 |
cb418dd3352d762e1baefc7d01fb14881ae6d077318ef24536b3c13bdf9dca52
|
Provenance
The following attestation bundles were made for jam_build-0.6.1-py3-none-any.whl:
Publisher:
pypi.yml on ildus/jamp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jam_build-0.6.1-py3-none-any.whl -
Subject digest:
584e2578e18f1939dc7c72ef2a3e6053bfcb5c1aa1b83c28f649cb4b494611e7 - Sigstore transparency entry: 199871264
- Sigstore integration time:
-
Permalink:
ildus/jamp@6432e30a5f4c02eacd1201b2ed99d468231a0823 -
Branch / Tag:
refs/tags/v0.6.1 - Owner: https://github.com/ildus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@6432e30a5f4c02eacd1201b2ed99d468231a0823 -
Trigger Event:
push
-
Statement type: