feat: bundle the CMake source tarball in the sdist - #729
Draft
henryiii wants to merge 1 commit into
Draft
Conversation
The sdist now includes archive-cache/cmake-<version>.tar.gz, so a from-source wheel build from the sdist needs no network. Building the sdist itself downloads the tarball. Archives now default to archive-cache/ in the source tree for both the CMake superbuild and the Python bootstrap, so both find the bundled file. Assisted-by: ClaudeCode:claude-fable-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Installing from the sdist required network access to download the CMake archive. Now
build_sdistdownloads the unix source tarball and bundles it asarchive-cache/cmake-<version>.tar.gz(sdist grows to ~13 MB). A from-source wheel build from the sdist works offline; building the sdist itself needs network.Changes:
backend.py:build_sdistwrapper fetches the tarball and injects it via thesdist.includeconfig-setting (exact filename, so stale archives in a dev tree are not picked up). Download + SHA256 check is shared with_bootstrap_build.CMakeLists.txt:CMakePythonDistributions_ARCHIVE_DOWNLOAD_DIRdefaults toarchive-cache/in the source tree. ExternalProject skips the download when the hash matches, so git builds also get a cache shared across wheel tags.build_sdistasserts the tarball is bundled;test_sdistinstalls from source behind a dead proxy (no_proxykeeps PyPI reachable), so it is a real offline test. It now compiles CMake, so it is slower.Not covered:
BUILD_CMAKE_FROM_SOURCE=OFF(macOS/Windows default) still downloads the prebuilt binary, and Windows source builds still download the.zip.Verified locally on macOS: wheel built from the unpacked sdist with
https_proxy=http://127.0.0.1:9; the same command with the archive removed fails at the download.