python-license-check
python-license-check copied to clipboard
Feature Request: Option To Specify Where To Look for License Information
Packages on the python package index specify license information in one of two or both places:
- As part of the trove classifiers
- As metadata
In some packages, the classifier information is more general e.g: "BSD License", whereas the metadata contains information on the specific version of the license used "BSD License (BSD-3-Clause)". For example:
- https://pypi.org/project/prettytable/
- https://pypi.org/project/Werkzeug/
Since liccheck will always prefer the information retrieved from the classifiers, it is not possible to block specific versions of licenses. However, if it is possible to specify that I prefer to retrieve license information from the package metadata, I could whitelist (or blacklist) specific versions (like BSD-4-Clause). For example, the pip-licenses package supports this.
I'm happy to open a pull request with the necessary changes.