Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download cpython installer to cache dir on macos #2108

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions cibuildwheel/macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def get_python_configurations(
return python_configurations


def install_cpython(tmp: Path, version: str, url: str, free_threading: bool) -> Path:
def install_cpython(_tmp: Path, version: str, url: str, free_threading: bool) -> Path:
ft = "T" if free_threading else ""
installation_path = Path(f"/Library/Frameworks/Python{ft}.framework/Versions/{version}")
with FileLock(CIBW_CACHE_PATH / f"cpython{version}.lock"):
Expand All @@ -161,10 +161,10 @@ def install_cpython(tmp: Path, version: str, url: str, free_threading: bool) ->
"""
)
raise errors.FatalError(msg)
pkg_path = tmp / "Python.pkg"
# download the pkg
download(url, pkg_path)
# install
python_filename = url.split("/")[-1]
pkg_path = CIBW_CACHE_PATH / "cpython-installer" / python_filename
if not pkg_path.exists():
download(url, pkg_path)
args = []
if version.startswith("3.13"):
# Python 3.13 is the first version to have a free-threading option
Expand Down