← All tasks
pythonannotated-types/annotated-types #85Not a task: already works

Hatchling fails to build annotated-types with "Field `project.license-files` must be an array"

envgap__annotated-types__annotated-types-85

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • The project already builds and runs before the fix, so there is nothing to repair.

02 / ENVIRONMENT RECIPE

Base commit
3fbeb6d129760ae48d7a0372fb9301764acc95ae
Manifest
pyproject.toml
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

annotated-types/annotated-types #85 · read the original issue
Hatchling [introduced a check](https://github.com/pypa/hatch/commit/28f233c535508247ffa9a40dab82c1d1cb2b700b#diff-b29708f9e31a5480d8552a96951ee054262d2d12b906e3997413eacc99f33b90R751-R753) for the project.license-files key to be [PEP-639](https://peps.python.org/pep-0639/) compliant. This means that license-files can no longer be

```

license-files = { paths = ['LICENSE'] }

```

but instead should be `license-files = ["LICENSE"]` or simply left out as [the default will glob](https://github.com/pypa/hatch/blob/c1a3c6b4c86ea2affe4734b54578f032fe5d0003/backend/src/hatchling/metadata/core.py#L748-L758) for that file:

```python

globs = ['LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*']

```



If you like, I can provide a PR with either of the two solutions.
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]