Skip to content

Add FAQ section on caching cibuildwheel's downloaded tools#2842

Open
xronocode wants to merge 1 commit into
pypa:mainfrom
xronocode:docs-caching-faq
Open

Add FAQ section on caching cibuildwheel's downloaded tools#2842
xronocode wants to merge 1 commit into
pypa:mainfrom
xronocode:docs-caching-faq

Conversation

@xronocode
Copy link
Copy Markdown

Closes #1585.

Summary

Adds a Tips entry to docs/faq.md (placed right before the existing Automatic updates using Dependabot section) covering:

  • What cibuildwheel caches (CPython/PyPy installers, virtualenv, python-build-standalone archives used on Android/iOS) and the default per-OS cache folder.
  • How to override the cache location with CIBW_CACHE_PATH.
  • A worked GitHub Actions example pairing actions/cache with CIBW_CACHE_PATH so the cache survives between runs (with a restore-keys fallback so non-pyproject changes still hit a cache).
  • A pointer to cibuildwheel --clean-cache for invalidating stale entries.
  • A cross-link to the platforms doc for OS-specific notes.

Scope

Per @joerick's reply on the issue ("A caching section in the FAQ would be great, if you can contribute it"), the scope is intentionally narrow — FAQ-level guidance only. The other two items in the original issue body — sharing artifacts between jobs and dispatching workflows across CI providers — are out of scope here:

  • The artifact-reuse pattern is already shown in examples/github-deploy.yml, and per @joerick's comment, "I wouldn't want to go much further than this."
  • Cross-CI dispatch (e.g. CircleCI from GitHub Actions) is wide enough that it deserves its own issue and probably belongs in ci-services.md rather than the FAQ.

Overlap with #2839

PR #2839 (Windows NuGet caching, closes #1527) edits docs/platforms.md with platform-specific guidance. This PR sits one level higher — FAQ overview pointing readers at the platforms doc for the per-OS specifics. No file overlap.

Test plan

  • uv run --group docs mkdocs build --strict — passes
  • uv run --with prek prek run --files docs/faq.md — passes (eof, line-endings, trailing whitespace, capitalization, codespell)
  • Render preview will be on Read the Docs once the build kicks off

Adds a Tips entry covering:

- What cibuildwheel caches (CPython/PyPy installers, virtualenv,
  python-build-standalone archives) and the default per-OS cache folder.
- How to override the cache location with ``CIBW_CACHE_PATH``.
- A worked GitHub Actions example pairing ``actions/cache`` with
  ``CIBW_CACHE_PATH`` so the cache survives between runs.
- A pointer to ``--clean-cache`` for invalidating stale entries.

Closes pypa#1585.

Per @joerick's request in the issue ("a caching section in the FAQ
would be great, if you can contribute it") the scope is intentionally
narrow — just FAQ-level guidance. Platform-specific caching (e.g.
Windows NuGet, addressed in pypa#2839) lives in the platforms doc.
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.

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

1 participant