A setuptools backend that supports pre- and post-build hooks via pyproject.toml
Project description
build_meta_plus
A lightweight setuptools build backend wrapper that supports pre- and post-build hooks via pyproject.toml.
build_meta_plus delegates all standard PEP 517/660 build logic to setuptools.build_meta, but allows you to execute shell commands at key stages of the build process.
Why use this?
build_meta_plus is ideal for streamlining your development workflow, from automating pre-build generation tasks to maintaining a tidy project environment by automatically managing temporary build artifacts.
For example, you can ensure your workspace remains clean by removing .egg-info directories immediately after a build:
[tool.build_meta_plus]
post-build = ["rm -rf *.egg-info"]
Getting Started
To use build_meta_plus in your project, configure your pyproject.toml to use it as the build backend and define your hooks:
[build-system]
requires = ["setuptools>=61", "wheel", "build_meta_plus"]
build-backend = "build_meta_plus"
[tool.build_meta_plus]
pre-build = [
"echo 'Generating assets...'",
"python scripts/generate_version.py"
]
post-build = [
"rm -rf *.egg-info",
"echo 'Cleanup complete.'"
]
When you run standard build or install commands (like python -m build or pip install .), build_meta_plus automatically intercepts the PEP 517/660 hooks, executes your pre-build commands, delegates the actual build to setuptools, and finally runs your post-build cleanup.
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_meta_plus-0.1.0.tar.gz.
File metadata
- Download URL: build_meta_plus-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97fac9fb100a9e3d774ba01011e5d903b18bf5b3aa5eb714eb0c81a1c236157f
|
|
| MD5 |
cb9756684a681588f1010316b4840f5c
|
|
| BLAKE2b-256 |
e82bf2a3f051755a075ceb78b28bfac34e807e3ac315cf7bf0bb1006187608de
|
File details
Details for the file build_meta_plus-0.1.0-py3-none-any.whl.
File metadata
- Download URL: build_meta_plus-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e4c0a5c279ba8a687508d714dc2290f557c5bb3977aacd3a132086117dfaec1
|
|
| MD5 |
247eb7f530c4a5574795de805e403192
|
|
| BLAKE2b-256 |
e9b981843cde32f565727c4774efb299ef4e4628329d260984e9fe96f114ca0d
|