c561328ce17d0c94d073d41bf45d2422fdf57ce7
This is useful for a script I'm writing to collect all the bundled crate licenses for centos-style vendored crates
Signed-off-by: Benjamin Herrenschmidt benh@amazon.com
Sorry for the late response.
I'm wondering if it wouldn't be easier if you used a short Python script directly?
Using cargo2rpm for what you're describing here just adds two layers of indirection:
cargo
cargo2rpm
You could do both with plain Python 3.11 and the tomllib module from the Python standard library in probably three lines of Python code, without adding both cargo and cargo2rpm to your script's dependencies.
tomllib
Ok, depending on how you do it, four lines of dependency-free Python 3.11 code:
import tomllib with file = open("Cargo.toml"): toml = tomllib.loads(file.read()) license = toml["package"]["license"]
Pull-Request has been closed by decathorpe
This is useful for a script I'm writing to collect all the bundled
crate licenses for centos-style vendored crates
Signed-off-by: Benjamin Herrenschmidt benh@amazon.com