Skip to main content

Build System Parser:

This library wraps common build systems and let you control them via python. Supported build systems are

  • bazel
  • make
  • CMake
  • ninja
  • cargo
  • compile_commands.json

Installation:

pip install build_system_parser

A shell.nix is provided for local development.

Usage:

You can either use the function find_build_system(path) to detect the build system automatically like:

# import this package
from build_system_parser import find_build_system

# parse the build system
B = find_build_system("path/to/Makefile")

# afterward the following functions are available
# get all available targets
all_targets = B.targets()
target = B.target("simple")

# build the target via
target.build()
# or
B.build(target)

# now you can run the target
target.run()
B.run(target)

Alternatively you can use a specific build system wrapper directly:

# available builders: Ninja, Make, CMake, Compile_Commands, Cargo
from build_system_parser import Ninja
B = Ninja("path/to/build.ninja")
B.targets()
B.build(B.target("simple"))

Additionally, you can pass specific compiler flags to the builder:

from build_system_parser import Make
B = Make("path/to/Makefile")
t = B.target("name_of_target")
B.build(t, "-O3 -march=native -fno-inline")
B.run(t)

Metadata

Release files for build-system-parser 0.0.3

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

Source distribution (sdist)

Source distribution for build-system-parser 0.0.3
File Size Uploaded
build_system_parser-0.0.3.tar.gz 19.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for build-system-parser 0.0.3
File Interpreter ABI Platform
build_system_parser-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 47.5 kB

Release files / build_system_parser-0.0.3.tar.gz

Download URL build_system_parser-0.0.3.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3dba4d324b7f1086831d74cc7435f1dad7810d00fd50b8b92dea18d17888f269
BLAKE2b-256 checksum
How to use checksums
594fe62437dafa347f2821370183fcb4ec94675e9e9a0f74172d6dbd790b3ae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.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.

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 Mar 26, 2026.

Transparency log

Release files / build_system_parser-0.0.3-py3-none-any.whl

Download URL build_system_parser-0.0.3-py3-none-any.whl
Size 28.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd01c05384bf6670ee56e3a754b418c6c5981a1da4ec9e6bb72a6523adb90ff6
BLAKE2b-256 checksum
How to use checksums
c5edcd29f0d105d72186ca0518c483bbf46b89c5c9206e8f7e13da9d8e8675b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.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.

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 Mar 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

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