Control all Build Systems
Project description
Build System Parser:
This library wraps common build systems and let you control them via python. Supported build systems are
bazelmakeCMakeninjacargocompile_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)
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 build_system_parser-0.0.3.tar.gz.
File metadata
- Download URL: build_system_parser-0.0.3.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dba4d324b7f1086831d74cc7435f1dad7810d00fd50b8b92dea18d17888f269
|
|
| MD5 |
ed2b802c4bd0ce34afa403bafeb98a35
|
|
| BLAKE2b-256 |
594fe62437dafa347f2821370183fcb4ec94675e9e9a0f74172d6dbd790b3ae5
|
Provenance
The following attestation bundles were made for build_system_parser-0.0.3.tar.gz:
Publisher:
publish.yml on FloydZ/python_builder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
build_system_parser-0.0.3.tar.gz -
Subject digest:
3dba4d324b7f1086831d74cc7435f1dad7810d00fd50b8b92dea18d17888f269 - Sigstore transparency entry: 1186416002
- Sigstore integration time:
-
Permalink:
FloydZ/python_builder@40499a2b515bcaf076ac4b690e31a5732bc4bf27 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/FloydZ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@40499a2b515bcaf076ac4b690e31a5732bc4bf27 -
Trigger Event:
release
-
Statement type:
File details
Details for the file build_system_parser-0.0.3-py3-none-any.whl.
File metadata
- Download URL: build_system_parser-0.0.3-py3-none-any.whl
- Upload date:
- Size: 28.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd01c05384bf6670ee56e3a754b418c6c5981a1da4ec9e6bb72a6523adb90ff6
|
|
| MD5 |
d947f723168f533dfda81dc0fe63a301
|
|
| BLAKE2b-256 |
c5edcd29f0d105d72186ca0518c483bbf46b89c5c9206e8f7e13da9d8e8675b9
|
Provenance
The following attestation bundles were made for build_system_parser-0.0.3-py3-none-any.whl:
Publisher:
publish.yml on FloydZ/python_builder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
build_system_parser-0.0.3-py3-none-any.whl -
Subject digest:
bd01c05384bf6670ee56e3a754b418c6c5981a1da4ec9e6bb72a6523adb90ff6 - Sigstore transparency entry: 1186416005
- Sigstore integration time:
-
Permalink:
FloydZ/python_builder@40499a2b515bcaf076ac4b690e31a5732bc4bf27 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/FloydZ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@40499a2b515bcaf076ac4b690e31a5732bc4bf27 -
Trigger Event:
release
-
Statement type: