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

sdist licensing follow ups #2843

Merged
merged 2 commits into from
Nov 13, 2024
Merged

sdist licensing follow ups #2843

merged 2 commits into from
Nov 13, 2024

Conversation

tomjakubowski
Copy link
Contributor

@tomjakubowski tomjakubowski commented Nov 9, 2024

This adds LICENSE.md from perspective to the sdist, and uses cargo-bundle-licenses to bundle perspective-python's dependency licenses into LICENSE_THIRDPARTY_cargo.yml, which is also added to the sdist.

When Maturin builds a wheel, it searches the source for files named LICENSE* (among others) and includes them in dist-info. C++ license packaging can use this same framework: we'll generate a file in the perspective-python source tree which aggregates licenses from arrow and other bundled C++ dependencies.

Adds a basic test of the license packaging to the sdist test. Note that this doesn't test the wheels we distribute, which takes a different build path in CI.

@@ -37,6 +37,7 @@ const version = pkg.version.replace(/-(rc|alpha|beta)\.\d+/, (x) =>
);

fs.mkdirSync(`./perspective_python-${version}.data`, { recursive: true });
fs.copyFileSync("../../LICENSE.md", "./LICENSE.md");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it turns out maturin develop needs this file around now that it's specified in pyproject.toml as {license { file = "LICENSE.md" }}, so I moved it out of the sdist branch so it always runs.

cmake_args
);
for arg in Shlex::new(&cmake_args) {
dst.configure_arg(arg);
}
}

println!("cargo:warning=MESSAGE Building cmake {}", profile);
println!("cargo:warning=Building cmake {}", profile);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MESSAGE is not needed in these warnings, I think we misunderstood the docs. See this CI run: https://github.com/tomjakubowski/perspective-oneoff-tests/actions/runs/11752078774/job/32743108312

Signed-off-by: Tom Jakubowski <tom@prospective.dev>
@tomjakubowski
Copy link
Contributor Author

tomjakubowski commented Nov 9, 2024

Not ready yet, need to update CI so that the metadata is copied for perspective-python (and then pulled down for the sdist build). I'll find an hour to do that this weekend

Also, a little surprising that node-tar silently ignores missing files 😬. Can make them error by doing this https://github.com/isaacs/node-tar?tab=readme-ov-file#warnings-and-errors this was glob ignoring missing files, which is expected behavior. Important difference:

glob(array_of_glob_globs.concat("path1/a.txt", "path2/b.txt"))
|> files -> tar.create(files)

is not the same as

glob(array_of_globs)
|> files -> tar.create(files.concat("path1/a.txt", "path2/b.txt"))

Signed-off-by: Tom Jakubowski <tom@prospective.dev>
@tomjakubowski tomjakubowski marked this pull request as ready for review November 11, 2024 20:56
Copy link
Member

@texodus texodus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Looks good!

@texodus texodus merged commit 632c051 into finos:master Nov 13, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants