blight 0.0.46
pip install blight==0.0.46
Newer version available (0.0.53)
Released:
A catch-all compile-tool wrapper
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache Software License (Apache-2.0)
- Author: William Woodruff
- Requires: Python >=3.7
Classifiers
- Intended Audience
- License
- Programming Language
- Topic
Project description
blight
blight
is a framework for wrapping and instrumenting build tools.
Usage
$ pip3 install blight
$ eval $(blight-env --guess-wrapped)
$ export BLIGHT_ACTIONS="Record"
$ export BLIGHT_ACTION_RECORD="output=/tmp/demo.jsonl"
$ cd /your/project && make
$ cat /tmp/demo.jsonl
Goals
- Wrapping
CC
,CXX
,CPP
,LD
,AS
,AR
,STRIP
, andINSTALL
. - Providing a visitor-style API for each of the above, pre- and post-execution.
- Providing a nice set of default actions.
- Being as non-invasive as possible.
Anti-goals
- Using
LD_PRELOAD
to capture everyexec
in a build system, a la Bear. - Supporting
cl.exe
. - Detailed support for non C/C++ languages.
Contributing a new action
New blight actions are easy to write. For example, the following prints a message before every ld
invocation:
# src/blight/actions/printld.py
from blight.action import LDAction
class PrintLD(LDAction):
def before_run(self, tool):
print(f"ld was run with: {tool.args}")
# src/blight/actions/__init__.py
# bring PrintLD into blight.actions so that `BLIGHT_ACTIONS` can find it
from printld import PrintLD # noqa: F401
$ eval $(blight-env --guess-wrapped)
$ export BLIGHT_ACTIONS="PrintLD"
$ make
Check out blight's API documentation for more details, including the kinds of available actions.
The name?
Build systems and tools that instrument build systems are a blight on my productivity.
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache Software License (Apache-2.0)
- Author: William Woodruff
- Requires: Python >=3.7
Classifiers
- Intended Audience
- License
- Programming Language
- Topic
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
File details
Details for the file blight-0.0.46.tar.gz
.
File metadata
- Download URL: blight-0.0.46.tar.gz
- Upload date:
- Size: 33.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
583dd4a5a6bb4b5e304094e597be8c1749f669a9cea77a8e673ee4baa58d55d7
|
|
MD5 |
d7650c9a5b1dceb83cf15bf59988c2ef
|
|
BLAKE2b-256 |
eea640ffd19c4375c54881ceab3b0dfc4003c7b54dca268cce743ac5cd5305aa
|
File details
Details for the file blight-0.0.46-py3-none-any.whl
.
File metadata
- Download URL: blight-0.0.46-py3-none-any.whl
- Upload date:
- Size: 35.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d7dc81974135cbf3b77505c0d59e642f08e25d999d1e48df87d131e937a6439b
|
|
MD5 |
58f5bff64ce459826c536fe4fdebe190
|
|
BLAKE2b-256 |
85f43890974a210d7da2506bfe5c843a3519f53b4ab2828ea3185d4c6e58bd1e
|