conda-package-handling icon indicating copy to clipboard operation
conda-package-handling copied to clipboard

License does not endup in the metadata of package

Open wagenrace opened this issue 11 months ago • 1 comments

Checklist

  • [x] I added a descriptive title
  • [x] I searched open reports and couldn't find a duplicate

What happened?

Hey, I am using the tool license-scanner to find out what licenses are needed for my Python env. This does not work on conda-package-handling, it seems like the classifier is passed on correctly.

Error shown with pip

pip show conda-package-handling 
Name: conda-package-handling
Version: 2.4.0
Summary: Create and extract conda packages of various formats.
Home-page: https://github.com/conda/conda-package-handling
Author: Anaconda, Inc.
Author-email: [email protected]
License:
Location: C:\Users\tom.nijhof\AppData\Local\miniconda3\envs\entity\Lib\site-packages
Requires: conda-package-streaming
Required-by:

Error shown with setuptools

from pkg_resources import working_set
package_name = working_set.normalized_to_canonical_keys["conda-package-handling"]
package = working_set.by_key[package_name]
metadata_lines = package.get_metadata("METADATA").split("\n")
[print(l) for l in metadata_lines if l.startswith("Classifier")]
Classifier: Programming Language :: Python :: 3

Possible solution: pep 639

pep 639 introduced a new way to add the license. Replace license in pyproject.toml with License-Expression and License-File

Additional Context

No response

wagenrace avatar May 15 '25 14:05 wagenrace

From all the BSD license there are I think conda-package-handling uses BSD 3-Clause "New" or "Revised" License with short identifier BSD-3-Clause

https://spdx.org/licenses/BSD-3-Clause.html

wagenrace avatar May 15 '25 14:05 wagenrace