Skip to main content

Add a packaging extra with pinned dependencies from a lock file

Project description

hatch-pinned-extra

License GitHub last commit PyPI - Downloads uv

Hatch plugin that adds a packaging extra to the wheel metadata with pinned dependencies from uv.lock.

Usage

# pyproject.toml
[build-system]
requires = [
    "hatchling",
    "hatch-pinned-extra>=0.0.1,<0.1.0",
]
build-backend = "hatchling.build"

[tool.hatch.metadata.hooks.pinned_extra]
name = "pinned"

If your package doesn't have any optional dependencies already, you will need to mark them as dynamic:

# pyproject.toml
[project]
dynamic = [
    "optional-dependencies",
]

Enabling the Plugin

The plugin requires the HATCH_PINNED_EXTRA_ENABLE environment variable to be set to activate. This design allows you to control when pinned dependencies are included:

# Build with pinned dependencies
HATCH_PINNED_EXTRA_ENABLE=1 uv build

# Update lockfile without constraints from pinned dependencies
uv lock --upgrade

This approach solves the circular dependency issue where pinned dependencies become constraints during uv lock --upgrade, preventing actual upgrades.

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_pinned_extra-0.0.3.tar.gz (182.1 kB view details)

Uploaded Source

Built Distribution

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

hatch_pinned_extra-0.0.3-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file hatch_pinned_extra-0.0.3.tar.gz.

File metadata

  • Download URL: hatch_pinned_extra-0.0.3.tar.gz
  • Upload date:
  • Size: 182.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hatch_pinned_extra-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7c471b2d837b5cd2571cf25e9a2245112dbabc02b86bc48bb719981e232c3bd6
MD5 bbfce6512dc83502b5ebe345b7b06d16
BLAKE2b-256 5fdf01a23042b324695868e0e0d2e7517f16233a3077863f2c18a61ac90187b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_pinned_extra-0.0.3.tar.gz:

Publisher: build.yaml on edgarrmondragon/hatch-pinned-extra

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_pinned_extra-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for hatch_pinned_extra-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f501b581c96008eefabeed4f0193e3296ab9b36ba7845bce0413699665bb7120
MD5 1bce716efa7e09286be5730b64052c19
BLAKE2b-256 11209638735ef33c81bc7282d4aae27513062e1492a96b3510727269642f3e08

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_pinned_extra-0.0.3-py3-none-any.whl:

Publisher: build.yaml on edgarrmondragon/hatch-pinned-extra

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