Closed leonardohn closed 1 year ago
I don't think this is the right approach. With the patch, I get:
$ cargo-ebuild ebuild
WARNING: unknown license "" at package "unicode-ident", please correct manually
WARNING: unknown license "" at package "unicode-ident", please correct manually
WARNING: unknown license "Unicode-DFS-2016" at package "unicode-ident", please correct manually
Wrote: cryptography-rust-0.1.0.ebuild
So I guess the parentheses now create additional empty tokens.
I forgot that the split function would actually give an empty string for the left and right side of the left and right parentheses, respectively. Please test again.
About the approach, I know it is not as clean as using an actual parser, but I guess writing a parser for that would be overkill and as not as simple to understand. What do you think?
Yeah, this one seems to work.
I don't know about Rust but it took me 5 minutes to find a SPDX parsing library in Python.
In fact there is the spdx library in Rust, but I think it introduces complexity for the sole purpose of obtaining the set of license names from the SPDX string. If the current implementation show not to be reliable, I might reimplement using it, though.
Yeah, I suppose there's not much point in bothering with that, given that pycargoebuild is superior to cargo-ebuild in every way I can think of.
This fixes issue #27.