Skip to content

docs: add Windows NuGet cache guidance#2839

Open
Herrtian wants to merge 1 commit into
pypa:mainfrom
Herrtian:docs-windows-nuget-cache
Open

docs: add Windows NuGet cache guidance#2839
Herrtian wants to merge 1 commit into
pypa:mainfrom
Herrtian:docs-windows-nuget-cache

Conversation

@Herrtian
Copy link
Copy Markdown
Contributor

@Herrtian Herrtian commented May 5, 2026

Adds a short Windows docs section for caching cibuildwheel's NuGet CPython installs between CI runs. I kept the example GitHub Actions-specific and included the cache poisoning warning called out in the issue.

Closes #1527.

Checks run locally:

  • git diff --check
  • uv run --with prek prek run --files docs/platforms.md
  • uv run --group docs mkdocs build --strict

Copy link
Copy Markdown
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks neat, thanks! Could you please move these changes to after the "Windows ARM64 builds" section? Also, inline comments below.

I will leave it open in case anyone else has comments about the wording.

Comment thread docs/platforms.md
Comment on lines +161 to +172
```yaml
env:
CIBW_CACHE_PATH: ${{ runner.temp }}\cibw-cache

steps:
- uses: actions/cache@v4
with:
path: ${{ env.CIBW_CACHE_PATH }}\nuget-cpython
key: cibw-nuget-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.github/workflows/*', 'pyproject.toml') }}

- uses: pypa/cibuildwheel@v3.4.1
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are caching the nuget-cpython directory, which only exists on Windows, can we remove runner.os from the cache key?

Copy link
Copy Markdown
Contributor

@joerick joerick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this advice could be broadened to caching the whole CIBW_CACHE_DIR? I believe it would also benefit macOS by preventing the redownload of CPython installers there too. Curious if anyone's had experience with doing that.

@agriyakhetarpal
Copy link
Copy Markdown
Member

Hmm, it looks like #2842 would be such a PR, it looks like it's more general!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Caching NuGet (Windows) Python installations: Doc guidance or option in GitHub Action?

3 participants