Skip to main content

Hatch Dependency Freezing Plugin: Enhancing Build Consistency

Project description

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 the uv export command.

    [tool.hatch.build.hooks.hatch-build-freeze]
    uv-args = ["--resolution=lowest-direct", "--no-header", "--prerelease=allow"]
    

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_build_freeze-1.1.0.tar.gz (44.6 kB view details)

Uploaded Source

Built Distribution

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

hatch_build_freeze-1.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file hatch_build_freeze-1.1.0.tar.gz.

File metadata

  • Download URL: hatch_build_freeze-1.1.0.tar.gz
  • Upload date:
  • Size: 44.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for hatch_build_freeze-1.1.0.tar.gz
Algorithm Hash digest
SHA256 6581452887f4befaccaf14ed392a85c3342f5ea5ea5009a7b4fc7bb4f596e069
MD5 6e8404fd1c0062d116a342491befb0e6
BLAKE2b-256 717b99e0ffb2ae2c9609c7fb82253ae719d331a16e4cb5f1cf69249cdb5baefb

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_build_freeze-1.1.0.tar.gz:

Publisher: publish.yaml on minds-ai/hatch-build-freeze

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_build_freeze-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hatch_build_freeze-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac8f7703bb9d55d2e5c06ef2dc33c0a9677b70e08fb24d21bf1891737a56c1e3
MD5 39df39c946e2acf23339c883d38bfc6c
BLAKE2b-256 0028d6b2dbf8a3b9446a099a9b32072ca4bdaefd8ef41cec412e052d08ff1b59

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_build_freeze-1.1.0-py3-none-any.whl:

Publisher: publish.yaml on minds-ai/hatch-build-freeze

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