You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before proceeding, please make sure to follow these steps:
I have checked for similar issues in the project's issue tracker.
I have searched closed issues to see if a similar problem was reported before.
Description
I have a small project that uses setup.cfg for PyPI packaging, and using licensecheck I get prompted to enter the license for my own project, even though the license is listed in the classifiers under metadata in setup.cfg, as well as directly with "license =" in the metadata.
Looking through the earlier issues I think this comes from: #23
I do not understand the original motivation for using the construct here, so I might be missing something, however I can fix the problem for my situation by removing the ".dict" in:
packageinfo.py : getMyPackageLicense()
from:
if "metadata" in config.sections() and "license" in config["metadata"]:
return config["metadata"].__dict__
to:
if "metadata" in config.sections() and "license" in config["metadata"]:
return config["metadata"]
Simply getting rid of the construct using .dict , it starts returning the metadata correctly, it finds the license classifier and it does not prompt the user for the information etc. It is also curious that it here checks for the presence of "license" in the metadata, but then later uses the "classifers" entry instead?
Otherwise this looks like a great tool and many thanks to the developers for making this available!
System Information
Operating System (OS): Ubuntu 22.04.3
Python Version: 3.10.12
The text was updated successfully, but these errors were encountered:
Ah thanks for the issue, and the investigation too!
Really frustrating that I introduced a big there, so apologies. Basically it was to make the type checker (pyright/ pylance) happy and I thought I'd tested it thoroughly, clearly not! I'll add it to my to-do list :)
Before You Begin
Before proceeding, please make sure to follow these steps:
Description
I have a small project that uses setup.cfg for PyPI packaging, and using licensecheck I get prompted to enter the license for my own project, even though the license is listed in the classifiers under metadata in setup.cfg, as well as directly with "license =" in the metadata.
Looking through the earlier issues I think this comes from:
#23
I do not understand the original motivation for using the construct here, so I might be missing something, however I can fix the problem for my situation by removing the ".dict" in:
packageinfo.py : getMyPackageLicense()
from:
to:
Simply getting rid of the construct using .dict , it starts returning the metadata correctly, it finds the license classifier and it does not prompt the user for the information etc. It is also curious that it here checks for the presence of "license" in the metadata, but then later uses the "classifers" entry instead?
Otherwise this looks like a great tool and many thanks to the developers for making this available!
System Information
The text was updated successfully, but these errors were encountered: