diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5acdc9d3..c2b95e65 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,6 +54,21 @@ jobs: run: | pip install maturin==1.9.6 maturin build --locked --profile dev --manifest-path crates/weft-python/Cargo.toml --out dist + - name: Sdist metadata and compile inputs + # Cheap guard (the full sdist -> wheel build runs in the nightly features job, + # about 8 minutes cold): pip's metadata step failed on nested license-files, + # and the sdist once lacked the schemas weft-core includes at compile time. + run: | + maturin sdist --out "$RUNNER_TEMP/sdist" + mkdir "$RUNNER_TEMP/sdist-src" + tar -xzf "$RUNNER_TEMP"/sdist/*.tar.gz -C "$RUNNER_TEMP/sdist-src" --strip-components=1 + (cd "$RUNNER_TEMP/sdist-src" && maturin pep517 write-dist-info \ + --metadata-directory "$RUNNER_TEMP/sdist-meta" --interpreter "$(command -v python)") + for f in LICENSE.md LICENSE-MIT LICENSE-APACHE THIRD-PARTY-LICENSES.txt; do + test -s "$RUNNER_TEMP"/sdist-meta/*.dist-info/licenses/"$f" + done + (cd "$RUNNER_TEMP/sdist-src" && grep -rhoE '\.\./(\.\./)+docs/[A-Za-z0-9._/-]*\.schema\.json' crates/*/src \ + | sed 's#^\(\.\./\)*##' | sort -u | while read -r f; do test -f "$f" || { echo "missing from sdist: $f"; exit 1; }; done) - name: Install the wheel in a fresh venv and run the installed-wheel checks run: | python -m venv "$RUNNER_TEMP/venv" diff --git a/THIRD-PARTY-LICENSES.txt b/THIRD-PARTY-LICENSES.txt new file mode 120000 index 00000000..c9c54a7e --- /dev/null +++ b/THIRD-PARTY-LICENSES.txt @@ -0,0 +1 @@ +crates/weft-python/THIRD-PARTY-LICENSES.txt \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 90ab57b7..3f1d387c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires=["maturin==1.9.6"] build-backend="maturin" [project] license = "MIT OR Apache-2.0" -license-files = ["crates/weft-python/LICENSE.md", "crates/weft-python/LICENSE-MIT", "crates/weft-python/LICENSE-APACHE", "crates/weft-python/THIRD-PARTY-LICENSES.txt"] +license-files = ["LICENSE.md", "LICENSE-MIT", "LICENSE-APACHE", "THIRD-PARTY-LICENSES.txt"] name="umf-weft" version = "0.4.58" description="Native UMF-powered SQL compiler with explicit backend profiles" @@ -14,6 +14,6 @@ Repository="https://github.com/DocumentDrivenDX/weft" Issues="https://github.com/DocumentDrivenDX/weft/issues" [tool.maturin] manifest-path="crates/weft-python/Cargo.toml" -include=[{path="tests/**/*",format="sdist"},{path="spec/**/*",format="sdist"},{path=".cargo/**/*",format="sdist"},{path="vendor/ahash/**/*",format="sdist"}] +include=[{path="tests/**/*",format="sdist"},{path="spec/**/*",format="sdist"},{path=".cargo/**/*",format="sdist"},{path="vendor/ahash/**/*",format="sdist"},{path="docs/helix/02-design/contracts/**/*",format="sdist"},{path="docs/helix/03-test/fixtures/**/*",format="sdist"}] bindings="pyo3" features=["ashlar-sdk-ordered-page-candidate","raw-postgresql-reads","ashlar-databricks-paths-keys","ashlar-databricks-qualified","truss-postgresql-pg18","current-postgresql-scalar-candidate","current-databricks-scalar-candidate","current-query-refinement-candidate","current-presence-graph-requirements-candidate"]