Skip to main content

Add a packaging extra with pinned dependencies from a lock file

Reason this release was yanked:

Broken entry-point

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 a truthy value to activate (e.g. 1, true, yes, on). 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.1.0.tar.gz (196.0 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.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hatch_pinned_extra-0.1.0.tar.gz
  • Upload date:
  • Size: 196.0 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.1.0.tar.gz
Algorithm Hash digest
SHA256 9a22e2dd239725741a99e2eaf29b3d08beb469b18eed9ab3b6c5478d498d965f
MD5 0f3ed3d37b81418f0aeea39e6ffb514d
BLAKE2b-256 b4ead22eaa281eafc10596721165bd24b5a8ae79b43eb362fe5a0c03097a43b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_pinned_extra-0.1.0.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.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for hatch_pinned_extra-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0de98b4e98c8ffa464da0a97b09e1325ff47015eb22cb656b62b3ce689cb933
MD5 97f09d5f07d9ed44080164c2539aefcc
BLAKE2b-256 f299105fd82c886aec423bf56fdc49c1852155711a31c60e1d1716be3c78b47a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hatch_pinned_extra-0.1.0-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