Skip to content

Commit

Permalink
fix: add python3.exe symlink on windows (#917)
Browse files Browse the repository at this point in the history
* Add python3.exe symlink.

* Check if python3.exe already exists and print debug info.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Raise error.

* Remove error raise and debug output.

* Add comment to symlink creation.

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
  • Loading branch information
3 people committed Nov 14, 2021
1 parent 2710202 commit 53251c7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cibuildwheel/windows.py
Expand Up @@ -97,6 +97,10 @@ def install_cpython(version: str, arch: str, nuget: Path) -> Path:
nuget_args = get_nuget_args(version, arch)
installation_path = Path(nuget_args[-1]) / (nuget_args[0] + "." + version) / "tools"
call([nuget, "install", *nuget_args])
# "python3" is not included in the vanilla nuget package,
# though it can be present if modified (like on Azure).
if not (installation_path / "python3.exe").exists():
(installation_path / "python3.exe").symlink_to(installation_path / "python.exe")
return installation_path


Expand Down

0 comments on commit 53251c7

Please sign in to comment.