Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix license classifier #10

Merged
merged 1 commit into from
Jun 25, 2024
Merged

Conversation

joostlek
Copy link
Contributor

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, and maybe bump in Home Assistant, that would be awesome :)

@bdraco bdraco merged commit 5eb1664 into Bluetooth-Devices:main Jun 25, 2024
6 checks passed
@joostlek joostlek deleted the patch-1 branch June 28, 2024 11:07
@@ -6,7 +6,6 @@ authors = [
{ name = "Aarni Koskela", email = "[email protected]" },
]
requires-python = ">=3.9"
license = "MIT"
Copy link
Collaborator

@akx akx Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed, though? I'm pretty sure there are plenty of tools that read this field rather than classifiers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the classifier sets it on the license field in pypi iirc

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, apparently it does the thing alright:

(ruuvitag-ble) ~/b/ruuvitag-ble (main) $ python
>>> import importlib.metadata as im
>>> im.metadata("ruuvitag-ble")
>>> m["License-Expression"]
'MIT'
>>>

Never mind! :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR should probably be reverted.Hatchling prefers the license field of classifier. PyPI will add support for License-Expression soon as well.

https://hatch.pypa.io/1.11/config/metadata/#spdx-expression
pypi/warehouse#16620

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #25

cdce8p added a commit that referenced this pull request Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants