Skip to content

License-File core metadata field not emitted #1828

@konstin

Description

@konstin

It seems that hatchling is emitting the License key in metadata for PEP 639 and including the glob-matched files in the correct directory, but it is not emitting the License-File key.

Input:

[project]
name = "test-token"
version = "0.1.0"
license = "MIT OR Apache-2.0"
license-files = ["LICENSE-MIT", "LICENSE-APACHE"]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
$ tree
.
├── LICENSE-APACHE
├── LICENSE-MIT
├── pyproject.toml
└── src
    └── test_token
        └── __init__.py

Output:

$ unzip -l dist/test_token-0.1.0-py2.py3-none-any.whl
Archive:  dist/test_token-0.1.0-py2.py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
       63  2020-02-02 00:00   test_token/__init__.py
       81  2020-02-02 00:00   test_token-0.1.0.dist-info/METADATA
      105  2020-02-02 00:00   test_token-0.1.0.dist-info/WHEEL
    11356  2020-02-02 00:00   test_token-0.1.0.dist-info/licenses/LICENSE-APACHE
     1077  2020-02-02 00:00   test_token-0.1.0.dist-info/licenses/LICENSE-MIT
      503  2020-02-02 00:00   test_token-0.1.0.dist-info/RECORD
---------                     -------
    13185                     6 files

METADATA in dist/test_token-0.1.0-py2.py3-none-any.whl:

Metadata-Version: 2.3
Name: test-token
Version: 0.1.0
License: MIT OR Apache-2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions