Skip to content

Commit 1ece496

Browse files
committed
Set environment variables for python in windows ci.
1 parent b9904e7 commit 1ece496

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/metacall-environment.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@ function sub-python {
7878
# Install Python
7979
./python_installer.exe /quiet "TargetDir=$RuntimeDir" `
8080
Include_debug=1 Include_symbols=1 PrependPath=1 CompileAll=1
81-
md -Force "$RuntimeDir\Pip"
8281

82+
# Set environment variables
8383
Add-to-Path $RuntimeDir
84+
[Environment]::SetEnvironmentVariable("PYTHONHOME", $RuntimeDir)
85+
[Environment]::SetEnvironmentVariable("PIP_TARGET", "$RuntimeDir\Lib")
8486

8587
# Patch for FindPython.cmake
8688
$FindPython = "$ROOT_DIR\cmake\FindPython.cmake"

0 commit comments

Comments
 (0)