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.1.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.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hatch_frozen-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a4a9128b629ca9e99b66c0a9c4ceaf152fea69b4173340572d53ba805c6b20fe
MD5 c5f3e65f6a794f64a138df785fe0972c
BLAKE2b-256 764dfd89d69feaef3a1ba3f020fb49739fdff699d09e29be337829271f9e24b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_frozen-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: hatch_frozen-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5fd6643dca270e7992a780d9e965c586e0ffb3f7bb52050d5d2847d9bcc0dd94
MD5 3b611392c4eb16e1d10e4ebf50fb354c
BLAKE2b-256 7a935a46ea466efe9c2211d54922f21ae1bfb2dace6184ee07df28fbad464054

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_frozen-0.1.1-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