Skip to main content

A build hook plugin for Hatch to freeze the depedency tree for repeatable builds

Project description

hatch-frozen: A Hatch build hook plug-in for freezing dependencies

CI - Test

This plugin freezes the dependency tree of your builds. In practice, this ensures that Pip always pulls the exact same dependency tree when your package is installed.

Usage

In your pyproject.toml file, add the following:

[tool.hatch.build.hooks.frozen]
dependencies = ["hatch-frozen"]

The plug-in reads the frozen dependencies from the requirements.txt file of your project, so make sure this file exists.

Example with with uv

  1. Configure the pyproject.toml file as explained above.

  2. Generate the requirements.txt file:

$ uv pip compile pyproject.toml -o requirements.txt
  1. Build your package:
$ uv build
  1. Clean the requirements file:
$ rm requirements.txt

Hacking

The project uses uv as the package manager.

To run the tests, use:

uv run pytest

To verify the code style, use:

uvx ruff check

Releasing

To release a new version of the package, bump the version in pyproject.toml and create and push a new git tag.

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_frozen-0.1.0.tar.gz (40.7 kB view details)

Uploaded Source

Built Distribution

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

hatch_frozen-0.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file hatch_frozen-0.1.0.tar.gz.

File metadata

  • Download URL: hatch_frozen-0.1.0.tar.gz
  • Upload date:
  • Size: 40.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for hatch_frozen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1b05d0e3de6d1d445e31eb01a01a7ce84978c235652eaf581418e2d79dd6d7be
MD5 968dfe017d47dfd17323e80548dce5f7
BLAKE2b-256 924760e680a46ae1c96528f34e32344c81bc04f704c46c77b9cf6a36aa1ea29b

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_frozen-0.1.0.tar.gz:

Publisher: build.yml on RedHatTraining/hatch-frozen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hatch_frozen-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hatch_frozen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for hatch_frozen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ed3c6142b285959eb9e22795866eab8060df9434bb3575f4fa509ccaab5100e
MD5 30a288034f9381de0f0d3d4f8f21c243
BLAKE2b-256 7126c77106d2fa55bcf705efb6cc9185cf67044042d2596d6fea2224532fb403

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_frozen-0.1.0-py3-none-any.whl:

Publisher: build.yml on RedHatTraining/hatch-frozen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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