-
Notifications
You must be signed in to change notification settings - Fork 140
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
Support for SPDX composite license expressions #723
Comments
For reference, packaging's implementation is at https://github.com/pypa/packaging/blob/main/src/packaging/licenses/__init__.py, and it was based on Hatchling's implementation IIRC. |
Is Flit actually compliant with PEP 639 if it doesn't accept valid SPDX expressions? I don't think the assumption that most Python projects have only one license is accurate. Even this project has multiple licenses. The project itself is BSD-3-Clause but it also includes BSD-2-Clause code in https://github.com/pypa/flit/blob/main/flit_core/flit_core/versionno.py (if not other code under other licenses in other places), so the correct license expression would be Can Flit not use (a vendored copy of) the hatchling-derived code in |
I think that would be a good starting point, that’s why I linked to it. :) |
See @takluyver's comment in PR #707:
Flit could vendor the packaging algorithm, but it is a good point that more implementations is not a bad thing. A |
I don't like the |
To get PEP 639 license expressions in without too much delay, I opted to validate only simple expressions, i.e. a single license. SPDX also allows composite license expressions, combining multiple licenses with AND & OR, and detailing exceptions with WITH. Validation should be extended to allow these.
I'd like to aim to do this without any external dependencies, keeping flit_core with zero dependencies on recent Python versions, even though that will mean some duplicated effort with other packaging related projects.
The text was updated successfully, but these errors were encountered: