python-license-check icon indicating copy to clipboard operation
python-license-check copied to clipboard

Feature Request: Option To Specify Where To Look for License Information

Open florian42 opened this issue 2 years ago • 0 comments

Packages on the python package index specify license information in one of two or both places:

  1. As part of the trove classifiers
  2. 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.

florian42 avatar Apr 05 '22 12:04 florian42