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

Are DocumentRef licenses supported? #33

Closed
papadeltasierra opened this issue Apr 29, 2019 · 8 comments
Closed

Are DocumentRef licenses supported? #33

papadeltasierra opened this issue Apr 29, 2019 · 8 comments
Labels

Comments

@papadeltasierra
Copy link

The SPDX specifications allow this syntax:
license-ref = ["DocumentRef-"1*(idstring)":"]"LicenseRef-"1*(idstring)
However if I try to parse a license of DocumentRef-James:LicenseRef-Dean I get expections.
Am I doing something wrong or are these license-ref constructs not supported?

@pombredanne
Copy link
Member

pombredanne commented Apr 29, 2019

@papadeltasierra this should be fully working. Can you paste a snippet of the code that fails?

@papadeltasierra
Copy link
Author

papadeltasierra commented Apr 29, 2019

from license_expression import Licensing

licensing = Licensing()
expression = 'DocumentRef-James-1.0:LicenseRef-Eric-2.0'
parsed = licensing.parse(expression)
print(parsed)

The result of running this using Python 3 is

...
license_expression.ExpressionError: Invalid license key: the valid characters are: letters and numbers, underscore, dot or hyphen signs and spaces: "DocumentRef-spdx-tool-1.2:LicenseRef-MIT-Style-2"

pombredanne added a commit that referenced this issue Apr 29, 2019
Otherwise some valid SPDX references are not parsed, such as:
DocumentRef-James-1.0:LicenseRef-Eric-2.0

Reported-by: @papadeltasierra
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@pombredanne
Copy link
Member

@papadeltasierra Thank you ++. This has been fixed with eef4f16
Do you mind testing https://github.com/nexB/license-expression/tree/33-allow-colon-in-license-symbol ?

@papadeltasierra
Copy link
Author

No problem. What is your release schedule? How soon before this will filter through to an updated Python package on Pypi?

@pombredanne
Copy link
Member

@papadeltasierra there you go: this is on Pypi now
https://github.com/nexB/license-expression/releases/tag/v0.999
https://pypi.org/project/license-expression/
Just out of curiosity, what's your use case? (you do not have to answer but that would be nice!)

@pombredanne
Copy link
Member

@papadeltasierra ping? did you test this?

@papadeltasierra
Copy link
Author

Sorry, yes and it seems to work exactly as required. Thanks for a very quick turnaround.

@pombredanne
Copy link
Member

@papadeltasierra ack. Thank you! closing now

pombredanne pushed a commit that referenced this issue May 10, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
pombredanne pushed a commit that referenced this issue May 10, 2022
    * Create copyright statement from holder information

Signed-off-by: Jono Yang <jyang@nexb.com>
pombredanne pushed a commit that referenced this issue May 10, 2022
    * This is used for the case where we are starting off a project and have not yet generated requirements files

Signed-off-by: Jono Yang <jyang@nexb.com>
pombredanne pushed a commit that referenced this issue May 10, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
pombredanne pushed a commit that referenced this issue May 10, 2022
    * Add --init option to configure.bat
    * Update help text in configure and configure.bat

Signed-off-by: Jono Yang <jyang@nexb.com>
pombredanne pushed a commit that referenced this issue May 10, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
pombredanne pushed a commit that referenced this issue May 10, 2022
Signed-off-by: Jono Yang <jyang@nexb.com>
pombredanne pushed a commit that referenced this issue May 10, 2022
    * Update README.rst

Signed-off-by: Jono Yang <jyang@nexb.com>
pombredanne pushed a commit that referenced this issue May 10, 2022
    * Update README.rst with instructions for post-initialization usage

Signed-off-by: Jono Yang <jyang@nexb.com>
pombredanne pushed a commit that referenced this issue May 10, 2022
    * Replace references to scancode-toolkit repo with links to the skeleton repo

    * Remove --python option from configure.bat

Signed-off-by: Jono Yang <jyang@nexb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants