Skip to main content

A plugin for Hatch for writing build scripts

Project description

Hatch 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. You'll need to modify two sections of the file:

  • build-system.requires: To add hatch-build-scripts as a build dependency.
  • tool.hatch.build.hooks.build-scripts: To configure the build scripts you want to run.

In practice this looks like

[build-system]
requires = ["hatchling", "hatch-build-scripts"]
build-backend = "hatchling.build"

[[tool.hatch.build.hooks.build-scripts.scripts]]
out_dir = "out"
commands = [
    "echo 'Hello, world!' > hello.txt",
    "echo 'Goodbye, world!' > goodbye.txt",
]
artifacts = [
    "hello.txt",
    "goodbye.txt",
]

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

hatch_build_scripts-0.0.1.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

hatch_build_scripts-0.0.1-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

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