Skip to content
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

Multiple/combined licence parsing support #1

Open
domcleal opened this issue Dec 9, 2014 · 3 comments
Open

Multiple/combined licence parsing support #1

domcleal opened this issue Dec 9, 2014 · 3 comments

Comments

@domcleal
Copy link
Owner

domcleal commented Dec 9, 2014

2.0 is in the works, which changes how "+" (or later) licenses are expressed.

http://wiki.spdx.org/view/Legal_Team/Decisions/license_expression_syntax has some information.

It might mean this library has to parse the licence text a little (it probably should already, to support and/or) and validate "GPL-3.0+" as being the "GPL-3.0" licence.

@domcleal
Copy link
Owner Author

domcleal commented Dec 9, 2014

Maybe I'll change the API to something more supportive of multiple licences, switching "exist" to "valid":

  • .valid?("Apache 2.0 or GPL 3.0") => true
  • .valid?("GPL 3.0+") => true
  • .lookup("GPL 3.0+") => licence
  • .lookup("Apache 2.0 or GPL 3.0") => [licence, licence]
  • .lookup("Apache 2.0", "GPL 3.0") => [licence, licence]
  • .lookup(["Apache 2.0", "GPL 3.0"]) => [licence, licence]

Then perhaps deprecate the single value return value from .lookup for a future version? It would also be nice to be able to parse the and/or in a meaningful way.

@tuxinaut
Copy link

tuxinaut commented May 5, 2015

👍

@balupton
Copy link

balupton commented Jun 7, 2016

@domcleal I wouldn't care about updating lookup to support multiple licenses, but rather that doing the valid proposal

Our use case is over at bevry/staticsitegenerators-list#221

@domcleal domcleal changed the title SPDX License List 2.0 support Multiple/combined licence parsing support May 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants