-
Notifications
You must be signed in to change notification settings - Fork 152
Closed
Milestone
Description
You can put a license in your pyproject.toml and flit will check to make sure it has the correct form, but will then just throw it away rather than include it in the metadata.
flit/flit_core/flit_core/config.py
Lines 469 to 493 in 6982fae
| if 'license' in proj: | |
| _check_type(proj, 'license', dict) | |
| license_tbl = proj['license'] | |
| unrec_keys = set(license_tbl.keys()) - {'text', 'file'} | |
| if unrec_keys: | |
| raise ConfigError( | |
| "Unrecognised keys in [project.license]: {}".format(unrec_keys) | |
| ) | |
| # TODO: Do something with license info. | |
| # The 'License' field in packaging metadata is a brief description of | |
| # a license, not the full text or a file path. PEP 639 will improve on | |
| # how licenses are recorded. | |
| if 'file' in license_tbl: | |
| if 'text' in license_tbl: | |
| raise ConfigError( | |
| "[project.license] should specify file or text, not both" | |
| ) | |
| lc.referenced_files.append(license_tbl['file']) | |
| elif 'text' in license_tbl: | |
| pass | |
| else: | |
| raise ConfigError( | |
| "file or text field required in [project.license] table" | |
| ) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels