conda_recipe_manager.licenses.spdx_utils
- Description:
Provides a class that reads in the SPDX licensing database file to support SPDX utilities.
- SPDX Data Source (freely available for use):
Classes
Class that provides SPDX tooling from the SPDX license database file. |
- class conda_recipe_manager.licenses.spdx_utils.SpdxUtils[source]
Bases:
object
Class that provides SPDX tooling from the SPDX license database file.
- find_closest_license_match(license_field: str) str | None [source]
Given a license string from a recipe file (from /about/license), return the most likely ID in the SPDX database by string approximation.
TODO Future: We might want to evaluate these tools for future use as they likely do a better job at matching licenses to the SPDX standard. * https://github.com/spdx/spdx-license-matcher * https://github.com/nexB/license-expression
- Parameters:
license_field -- License string provided by the recipe to match
- Returns:
The closest matching SPDX identifier, if found