Modern License Metadata for Python Packages: An Introduction to PEP 639 and SPDX
dev.to·6h·
Discuss: DEV
Flag this post

As a developer working extensively on license_scanner, I’ve encountered numerous Python packages with outdated license metadata. Understanding PEP 639 is crucial, as it introduces significant changes to how licenses are managed in Python packages.

Key Changes in PEP 639

Python now adheres to the SPDX (Software Package Data Exchange) standard, moving away from using classifiers. The recommended approach is to use only two fields in your pyproject.toml file: license and license_files.

  • license: This field should be a string.
  • license_files: This field can be a string or a list of strings.

Choosing the Right License

There are numerous licenses available, many with similar names. For example, if a package i…

Similar Posts

Loading similar posts...