Skip to content

Commit

Permalink
sdist: include data_dir again, license dir fix
Browse files Browse the repository at this point in the history
The data dir was accidentally removed from the sdist in 053abcd.

Our Maturin version is currently incorrectly packaging the license files
under `.dist-info/license_files`, when it should be (according to PEP
639) in `.dist-info/licenses`.  This has been fixed in newer versions of
Maturin.  Update the CI test to check in both places so that it won't
break when we update Maturin.

Signed-off-by: Tom Jakubowski <[email protected]>
  • Loading branch information
tomjakubowski committed Nov 15, 2024
1 parent 126a6a1 commit bf08cab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -716,9 +716,12 @@ jobs:
- name: Verify licenses are installed
shell: bash
run: |
pip show -f perspective-python > wheel_installed_files.txt
grep licenses/LICENSE.md wheel_installed_files.txt
grep licenses/LICENSE_THIRDPARTY_cargo.yml wheel_installed_files.txt
pip show -f perspective-python | tee wheel_installed_files.txt
# Maturin got this wrong: the packages should be in .dist-info/licenses/
# Newer versions of Maturin will fix it, so search for either location.
# https://github.com/PyO3/maturin/pull/862 https://github.com/PyO3/maturin/pull/2181
grep '.dist-info/(license|license_files)/LICENSE.md' wheel_installed_files.txt
grep '.dist-info/(license|license_files)/LICENSE_THIRDPARTY_cargo.yml' wheel_installed_files.txt
- name: Verify labextension
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion rust/perspective-python/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ if (build_sdist) {
prefix: `perspective_python-${version}`,
strict: true,
},
crate_files.concat(["PKG-INFO"])
crate_files.concat(["PKG-INFO", data_dir])
);
}

Expand Down

0 comments on commit bf08cab

Please sign in to comment.