fix: add python3.exe symlink on windows (#917)
* 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>
This commit is contained in:
co-authored by
Henry Schreiner
pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
parent
2710202f18
commit
53251c7184
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user