commentjson icon indicating copy to clipboard operation
commentjson copied to clipboard

Fix license classifier

Open joostlek opened this issue 1 year ago • 1 comments

Hey 👋🏻,

I am currently looking into licensing at Home Assistant, and I found that we could not detect the license of this library properly. According to pyproject.toml documentation about the license field:

If you are using a standard, well-known license, it is not necessary to use this field. Instead, you should use one of the classifiers starting with License ::. (As a general rule, it is a good idea to use a standard, well-known license, both to avoid confusion and because some organizations avoid software whose license is unapproved.)

If you could do a release after this PR, that would be awesome :)

joostlek avatar Jun 24 '24 12:06 joostlek

Instead of adding classifiers, you should instead declare the license using an SPDX license Short Identifier: https://spdx.org/licenses/

In this case it'd be MIT Reference: https://spdx.org/licenses/MIT.html Add this to the setup() function

license='MIT',

You can probably do both, but be prepared to remove the license classifiers. They've been deprecated and could cause problems in future versions of setuptools. https://peps.python.org/pep-0639/#deprecate-license-classifiers

WilliamRoyNelson avatar Sep 22 '25 21:09 WilliamRoyNelson