Skip to content

Feature request: add SPDX parsing support to license ID algorithm #603

Description

@ngie-eign

I appreciate and have leveraged the license ID support in the identify package in the past to help identify licenses in files.

Many projects have started shifting from full licensing tort to SPDX identifiers for brevity, and unfortunately the tool/package doesn't identify these cases properly today.

An example failing case:

➜  /tmp python3
Python 3.12.13 (main, Jun 14 2026, 01:09:32) [Clang 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd7080 on freebsd15
Type "help", "copyright", "credits" or "license" for more information.
>>> from identify import identify
>>> identify.license_id("acpi.c")
>>>

Having a way to parse out the SPDX IDs would improve the usability of the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions