Dependency injection without the boilerplate.
Low maintenance activity. Last release 18 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install hatch-build-scriptsHatch Build Scripts
A plugin for Hatch that allows you to run arbitrary build scripts and include their artifacts in your package distributions.
Installation
To set up hatch-build-scripts for your project you'll need to configure it in your
project's pyproject.toml file as a build-system requirement:
[build-system]
requires = ["hatchling", "hatch-build-scripts"]
build-backend = "hatchling.build"
Usage
Now you'll need to configure the build scripts you want to run. This is done by adding
an array of scripts to the tool.hatch.build.hooks.build-scripts.scripts key in your
pyproject.toml file. Each script is configured with the following keys:
| Key | Default | Description |
|---|---|---|
commands | required | An array of commands to run. Each command is run in a separate shell. |
artifacts | [] | An array of artifact patterns (same as .gitignore) to include in your package distributions. |
out_dir | "." | The directory to copy artifacts into. |
work_dir | "." | The directory to run the commands in. All artifact patterns are relative to this directory. |
clean_artifacts | true | Whether to clean files from the out_dir that match the artifact patterns before running the commands. |
clean_out_dir | false | Whether to clean the before running the commands. |