Closed idavis closed 2 years ago
Though the paths and globs are mutually exclusive through validation, serialization allows them both to be specified.
Maybe we should use an enum instead?
@messense I tried to use an enum but the dotted names caused issues with the serialization.
We can also migrate to toml_edit: https://github.com/ordian/toml_edit
We already done that in maturin.
@messense Misread what you said, you're suggesting that we convert this repo to use toml_edit
. I'll give it a try.
@messense I have converted the repo to use toml_edit
just like maturin
. I was then able to convert the licenses metadata to an enum and added tests.
Thanks! Since PEP 639 is still a draft waiting for review, let's use git dependency in maturin for implementing multiple license files support for now.
Adds
license_expression
andlicense_files
to the pyproject matadata specified in PEP 639 Core Metadata. No validation is performed as that should be handled by consumers. Also adds default value forlicense_files
as described in PEP 639.Though the
paths
andglobs
are mutually exclusive through validation, serialization allows them both to be specified. I could not find a way to restrict this via the toml-rs serializer. I think there is a bug in the dotted key handling.