From 33fc866d13aa7147ee61e07305b25944d588e975 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Tue, 19 Mar 2024 22:58:34 +0000 Subject: [PATCH] Include Dynamic attribute in METADATA and PKG-INFO. In all cases it should still be absent, but that may change as other dynamic attributes are supported. --- whey/builder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/whey/builder.py b/whey/builder.py index d529b7a..5f576bf 100644 --- a/whey/builder.py +++ b/whey/builder.py @@ -402,6 +402,7 @@ def add_multiple(key: str, field: str) -> None: for value in self.config[key]: metadata_mapping[field] = str(value) # pylint: disable=loop-invariant-statement + add_multiple("dynamic", "Dynamic") metadata_mapping.update(self.parse_authors()) add_not_none("description", "Summary") @@ -463,7 +464,7 @@ def write_metadata(self, metadata_file: PathPlus, metadata_mapping: MetadataMapp :param metadata_file: """ - metadata_file.write_text(metadata.dumps(metadata_mapping)) + metadata_file.write_clean(metadata.dumps(metadata_mapping)) self.report_written(metadata_file) def call_additional_hooks(self) -> None: