/hatch-minify

Hatch build hook for minifying python binary distributions

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Hatch Minify Build Hook

This Hatch plugin provides a build hook for minifying python source code. This is useful for keeping distributions lean.

Global dependency

Ensure hatch-minify is defined within the build-system.requires field in your pyproject.toml file.

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

Build hook

The build hook plugin name is minify.

  • pyproject.toml

    [tool.hatch.build.targets.wheel.hooks.minify]
  • hatch.toml

    [build.targets.wheel.hooks.minify]

Note: It is not recommended to minify source distributions.

Editable installs

This build hook does not support editable installations.