Skip to content

Commit

Permalink
cache cpython install on macos
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Dec 7, 2024
1 parent 9c75ea1 commit eec7b3d
Showing 1 changed file with 5 additions and 5 deletions.
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.joinpath("python", 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

0 comments on commit eec7b3d

Please sign in to comment.