hatch-build-freeze
Hatch Dependency Freezing Plugin: Enhancing Build Consistency
Streamline your Python packaging workflow with this Hatch plugin designed to freeze your project's dependency tree. By automatically resolving and pinning all direct and transitive dependencies into a manifest file during the build process, it ensures:
- Reproducible Builds: Guarantee that your package builds with the same dependency versions every time.
- Consistent Environments: Simplify the creation of identical environments across development, testing, and production.
- Dependency Transparency: Provides a clear, version-locked list of all project dependencies.
Configuration
Calling the plugin
Modify pyproject.toml to include the plugin as a build dependency:
[build-system]
requires = ["hatchling", "hatch-build-freeze"]
build-backend = "hatchling.build"
[tool.hatch.build.hooks.hatch-build-freeze]
Disable the plugin
By default, the plugin is enabled. To disable it, use the environment variable HATCH_BUILD_FREEZE_DISABLED
HATCH_BUILD_FREEZE_DISABLED=1 hatch build
Plugin Configuration
The following options are supported:
-
groups(optional, list of strings): Specifies a list of dependency groups (e.g., from[dependency-groups]) to include in the frozen requirements.[tool.hatch.build.hooks.hatch-build-freeze] groups = ["group1", "group2"]
-
extras(optional, list of strings): Specifies a list of optional dependency groups (e.g., from[project.optional-dependencies]) to include in the frozen requirements.[tool.hatch.build.hooks.hatch-build-freeze] extras = ["extra1", "extra2"]
-
uv-args(optional, list of strings): A list of additional command-line arguments to pass directly to theuv exportcommand.[tool.hatch.build.hooks.hatch-build-freeze] uv-args = ["--resolution=lowest-direct", "--no-header", "--prerelease=allow"]
Metadata
Release files for hatch-build-freeze 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hatch_build_freeze-1.1.0.tar.gz | 44.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hatch_build_freeze-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.7 kB
Release files / hatch_build_freeze-1.1.0.tar.gz
| Download URL | hatch_build_freeze-1.1.0.tar.gz |
|---|---|
| Size | 44.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6581452887f4befaccaf14ed392a85c3342f5ea5ea5009a7b4fc7bb4f596e069
|
|
BLAKE2b-256 checksum How to use checksums |
717b99e0ffb2ae2c9609c7fb82253ae719d331a16e4cb5f1cf69249cdb5baefb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 12, 2025.
Transparency logRelease files / hatch_build_freeze-1.1.0-py3-none-any.whl
| Download URL | hatch_build_freeze-1.1.0-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac8f7703bb9d55d2e5c06ef2dc33c0a9677b70e08fb24d21bf1891737a56c1e3
|
|
BLAKE2b-256 checksum How to use checksums |
0028d6b2dbf8a3b9446a099a9b32072ca4bdaefd8ef41cec412e052d08ff1b59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 12, 2025.
Transparency log