Skip to main content

A drop-in replacement for setuptools.build_meta that adds automated pre- and post-build hooks for cleanup and asset generation

Project description

build-meta-plus

PyPI Package Run Tests Python >=3.9 License

A lightweight, drop-in replacement for the default setuptools.build_meta backend that supports automated pre- and post-build hooks via pyproject.toml.

build_meta_plus maintains full compatibility with setuptools while restoring the flexibility of custom build steps—ideal for replacing legacy setup.py hooks in modern PEP 517 projects.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

build_meta_plus-0.1.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

build_meta_plus-0.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file build_meta_plus-0.1.1.tar.gz.

File metadata

  • Download URL: build_meta_plus-0.1.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for build_meta_plus-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d703becf7415153489c7a59d3f024b878b70ef562d1fd6d8060bad34746d84fd
MD5 564f2ec3803b70165fe12ee734ac841f
BLAKE2b-256 3f88656ab9ab36d2608dcecdf8bad05475d14d79c0f6a1dcceafaf27786ec9cc

See more details on using hashes here.

File details

Details for the file build_meta_plus-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for build_meta_plus-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2b021aa5e1bfed2132a25b5bab34d05e34a9bfb579c571f582739120d8f0754
MD5 510aa265cca67560528ffad5e6719dea
BLAKE2b-256 4a128b0c2bbb5b583ee764937e9b45120d57dae827c84a3d1988f59528789927

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page