You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2026/09/07 22:26:30 UTC
[PR] [CONNECT] Include the LICENSE file in the maturin sdist [spark-connect-rust]
HyukjinKwon opened a new pull request, #97:
URL: https://github.com/apache/spark-connect-rust/pull/97
### What changes were proposed in this pull request?
Make the maturin **sdist** contain the repo-root `LICENSE`, and add a release-CI guard that fails if a declared `License-File` is missing from a built sdist.
- `pyproject.toml`: add `LICENSE` to `[tool.maturin] include` with `format = "sdist"` (the wheel already bundles it automatically and is unchanged).
- `.github/workflows/release.yml`: after `maturin sdist` (dry run + RC), assert every `License-File` declared in `PKG-INFO` is actually present in the tarball.
### Why are the changes needed?
maturin auto-bundles the license into the **wheel** (`*.dist-info/licenses/LICENSE`) but does **not** pull the repo-root `LICENSE` into the **sdist** — the maturin crate lives under `crates/pyspark-rs/`, so a file at the repository root is outside it and never gets packaged. Both artifacts still declare `License-File: LICENSE` in their metadata, so PyPI (PEP 639) rejects the sdist:
```
400 License-File LICENSE does not exist in distribution file
pyspark_client_rust-<v>.tar.gz at pyspark_client_rust-<v>/LICENSE
```
while the wheels upload fine. This surfaced only at **finalize of 4.2.0**: the four wheels reached PyPI but the sdist was rejected, blocking crates.io/tagging behind it. Neither `twine check` nor `cargo publish --dry-run` validates PEP 639 license-file presence, so the existing dry runs stayed green. The 4.2.0 release itself was completed by hand-adding the `LICENSE` to that sdist; this PR fixes the root cause so future releases (4.3.0+) build a valid sdist and CI catches the regression.
### Does this PR introduce _any_ user-facing change?
No. The published sdist gains the `LICENSE` file it already promised in metadata; the wheel is unchanged.
### How was this patch tested?
- Verified the failing sdist and the fix mechanics locally (sdist gains exactly `pyspark_client_rust-<v>/LICENSE`, all other files byte-identical).
- The new `release.yml` guard exercises the fix on the next scheduled dry run / RC cut (it builds the sdist and asserts the declared `License-File` is present).
> Note for the release manager: this project's PR titles carry a `[SPARK-XXXXX]` JIRA id — please prepend the appropriate JIRA before merging.
This pull request and its description were written by Isaac.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-59302][CONNECT] Include the LICENSE file in the maturin sdist [spark-connect-rust]
Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #97: [SPARK-59302][CONNECT] Include the LICENSE file in the maturin sdist
URL: https://github.com/apache/spark-connect-rust/pull/97
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org