Skip to content

Commit

Permalink
docs: fix packaging.licenses suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii authored Nov 17, 2024
1 parent a6487c0 commit 785f90b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ print(str(pkg_info)) # core metadata
If `project.license` is a string or `project.license-files` is present, then
METADATA 2.4+ will be used. A user is expected to validate and normalize
`metadata.license` with an SPDX validation tool, such as the one being added to
`packaging`. Add something like this:
`packaging`. Add something like this (requires packaging 24.2+):

```python
if isinstance(metadata.license, str):
metadata.license = packaging.licenses.normalize_license_expression(metadata.license)
metadata.license = packaging.licenses.canonicalize_license_expression(metadata.license)
```

A backend is also expected to copy entries from `project.licence_files`, which
Expand Down

0 comments on commit 785f90b

Please sign in to comment.