mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Add Python tools installation from Github releases for Windows (#705)
* Add Toolset provision for Windows Co-authored-by: MaksimZhukov <v-mazhuk@microsoft.com>
This commit is contained in:
@@ -44,21 +44,6 @@ Function NPMFeed-AuthSetup {
|
||||
$npmrcContent | Out-File -FilePath "$($env:TEMP)/.npmrc" -Encoding utf8
|
||||
}
|
||||
|
||||
Function Set-DefaultPythonVersion {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
[System.Version] $Version,
|
||||
[System.String] $Arch = "x64"
|
||||
)
|
||||
|
||||
$pythonPath = $Env:AGENT_TOOLSDIRECTORY + "/Python/${Version}*/${Arch}"
|
||||
$pythonDir = Get-Item -Path $pythonPath
|
||||
|
||||
Write-Host "Use Python ${Version} as a system Python"
|
||||
Add-MachinePathItem -PathItem $pythonDir.FullName
|
||||
Add-MachinePathItem -PathItem "$($pythonDir.FullName)\Scripts"
|
||||
}
|
||||
|
||||
Function Set-DefaultRubyVersion {
|
||||
param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
@@ -106,5 +91,4 @@ $ToolVersions.PSObject.Properties | ForEach-Object {
|
||||
}
|
||||
}
|
||||
|
||||
Set-DefaultPythonVersion -Version "3.7"
|
||||
Set-DefaultRubyVersion -Version "2.5"
|
||||
Reference in New Issue
Block a user