Patch Cargo.lock in uv-build source distributions (#18831)

Closes #18824 

This is a little janky but not ridiculous while we work on upstreaming a
proper fix. It seems like they can't just invoke `cargo` so I think it's
quite involved.

See also https://github.com/PyO3/maturin/issues/2609

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Zanie Blue
2026-04-07 11:50:34 -05:00
committed by GitHub
parent c5977cc4ae
commit f40124f1ee
3 changed files with 99 additions and 1 deletions
@@ -72,6 +72,8 @@ jobs:
maturin-version: v1.12.6
command: sdist
args: --out crates/uv-build/dist -m crates/uv-build/Cargo.toml
- name: "Fix Cargo.lock in sdist uv-build"
run: python scripts/repair-sdist-cargo-lock.py crates/uv-build/dist/${PACKAGE_NAME}_build-*.tar.gz
- name: "Test sdist uv-build"
run: |
pip install crates/uv-build/dist/${PACKAGE_NAME}_build-*.tar.gz --force-reinstall
+1 -1
View File
@@ -77,7 +77,7 @@ jobs:
[[ "$file" == "pyproject.toml" || "$file" =~ ^crates/.*/pyproject\.toml$ ]] && python_config_changed=1
[[ "$file" =~ ^\.github/workflows/.*\.yml$ ]] && workflow_changed=1
[[ "$file" == ".github/workflows/build-release-binaries.yml" || "$file" == ".github/workflows/release.yml" ]] && release_workflow_changed=1
[[ "$file" == "scripts/check_uv_wheel_contents.py" || "$file" == "scripts/patch-dist-manifest-checksums.py" ]] && release_build_changed=1
[[ "$file" == "scripts/check_uv_wheel_contents.py" || "$file" == "scripts/patch-dist-manifest-checksums.py" || "$file" == "scripts/repair-sdist-cargo-lock.py" ]] && release_build_changed=1
[[ "$file" == ".github/workflows/ci.yml" ]] && ci_workflow_changed=1
[[ "$file" == "uv.schema.json" ]] && schema_changed=1
[[ "$file" =~ ^crates/uv-publish/ || "$file" =~ ^scripts/publish/ || "$file" == "crates/uv/src/commands/publish.rs" ]] && publish_code_changed=1