hatch icon indicating copy to clipboard operation
hatch copied to clipboard

Feature: Pass version to custom metadata hook

Open potiuk opened this issue 1 year ago • 0 comments

Currently the CustomMetadataHook does not pass "version" information ("standard" / "editable" ) to update method which specifically impacts projects that set "optional-dependencies". This does not allow more dynamic calculation of the metadata, that depends on whether "editable" or "standard" build is run. Currently the "editable" and "standard" distinction is only available in the CustomBuildHook and projects need to hack around overriding the metadata there.

Example case for this is apache-airflow in here: https://github.com/apache/airflow/blob/420709962ec864fa62b6e1b6c2f723a2c14cb751/hatch_build.py#L751

Discussed in https://github.com/astral-sh/uv/issues/2130#issuecomment-2017082401

This one is Hatchling related.

potiuk avatar Mar 25 '24 09:03 potiuk