From f84625c36378c2c5af1ffcc138d58b908fd579e6 Mon Sep 17 00:00:00 2001 From: Carlos Corbacho Date: Tue, 22 Mar 2022 09:03:17 +0000 Subject: [PATCH] Output license.text to license field if supplied in metadata Until PEP 639 is finalized, many projects rely on the output of License in PKG-INFO being an SPDX string, if it is using a standard license, and third party tooling can process that. Rather than silently ignoring license.text, use that to populate the License field if it is provided, and leave it to downstream packages as to whether they are supplying license.file or license.text --- flit_core/flit_core/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flit_core/flit_core/config.py b/flit_core/flit_core/config.py index ade14b8d..2f48b047 100644 --- a/flit_core/flit_core/config.py +++ b/flit_core/flit_core/config.py @@ -508,7 +508,7 @@ def read_pep621_metadata(proj, path) -> LoadedConfig: ) lc.referenced_files.append(license_tbl['file']) elif 'text' in license_tbl: - pass + md_dict['license'] = license_tbl['text'] else: raise ConfigError( "file or text field required in [project.license] table"