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
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
-
Configure the
pyproject.tomlfile as explained above. -
Generate the
requirements.txtfile:
$ uv pip compile pyproject.toml -o requirements.txt
- Build your package:
$ uv build
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b05d0e3de6d1d445e31eb01a01a7ce84978c235652eaf581418e2d79dd6d7be
|
|
| MD5 |
968dfe017d47dfd17323e80548dce5f7
|
|
| BLAKE2b-256 |
924760e680a46ae1c96528f34e32344c81bc04f704c46c77b9cf6a36aa1ea29b
|
Provenance
The following attestation bundles were made for hatch_frozen-0.1.0.tar.gz:
Publisher:
build.yml on RedHatTraining/hatch-frozen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hatch_frozen-0.1.0.tar.gz -
Subject digest:
1b05d0e3de6d1d445e31eb01a01a7ce84978c235652eaf581418e2d79dd6d7be - Sigstore transparency entry: 169646082
- Sigstore integration time:
-
Permalink:
RedHatTraining/hatch-frozen@782eece9967402a4f53108ac98bfbcbca7d2cba2 -
Branch / Tag:
refs/heads/add-github-actions - Owner: https://github.com/RedHatTraining
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@782eece9967402a4f53108ac98bfbcbca7d2cba2 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ed3c6142b285959eb9e22795866eab8060df9434bb3575f4fa509ccaab5100e
|
|
| MD5 |
30a288034f9381de0f0d3d4f8f21c243
|
|
| BLAKE2b-256 |
7126c77106d2fa55bcf705efb6cc9185cf67044042d2596d6fea2224532fb403
|
Provenance
The following attestation bundles were made for hatch_frozen-0.1.0-py3-none-any.whl:
Publisher:
build.yml on RedHatTraining/hatch-frozen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hatch_frozen-0.1.0-py3-none-any.whl -
Subject digest:
6ed3c6142b285959eb9e22795866eab8060df9434bb3575f4fa509ccaab5100e - Sigstore transparency entry: 169646083
- Sigstore integration time:
-
Permalink:
RedHatTraining/hatch-frozen@782eece9967402a4f53108ac98bfbcbca7d2cba2 -
Branch / Tag:
refs/heads/add-github-actions - Owner: https://github.com/RedHatTraining
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@782eece9967402a4f53108ac98bfbcbca7d2cba2 -
Trigger Event:
push
-
Statement type: