Inject metadata during build process
097-index_2e7dc709skillsetup L3★4
tools-only/X-Skills ↗What it does
Dynamically inject and modify project metadata during build process
Best for
When version numbers, classifiers, or other metadata must be computed at build time from source files or environment
Inputs
- · metadata dictionary
- · hook configuration in pyproject.toml
Outputs
- · modified metadata dict with computed fields
Requires
- · hatchling
- · MetadataHookInterface
Preconditions
- · Implement MetadataHookInterface.update(metadata)
- · Configure hook path in [tool.hatch.metadata.hooks.*]
Failure modes
- · Hook modifies wrong metadata fields
- · Execution timing before/after build phases incorrect
- · get_known_classifiers() not implemented for custom classifiers
Trust signals
- · Hook executes on build, hatch project metadata command, install, and IDE operations