Install PyPy from official site instead of NPM for Ubuntu (#879)

* install PyPy from official site
This commit is contained in:
Aleksandr Chebotov
2020-05-18 11:07:37 +03:00
committed by GitHub
parent a8f49b6630
commit 47c7968b9d
11 changed files with 134 additions and 16 deletions

View File

@@ -27,8 +27,9 @@ $ErrorActionPreference = "Stop"
# Define executables for cached tools
$toolsExecutables = @{
Python = @("python", "bin/pip");
Python = @("python", "bin/pip")
node = @("bin/node", "bin/npm")
PyPy = @("bin/python", "bin/pip")
}
# Get toolset content
@@ -43,6 +44,11 @@ foreach($tool in $tools) {
$toolExecs = $toolsExecutables[$tool.name]
foreach ($version in $tool.versions) {
# Add wildcard if missing
if (-not $version.Contains('*')) {
$version += '.*'
}
# Check if version folder exists
$expectedVersionPath = Join-Path $toolPath $version
if (-not (Test-Path $expectedVersionPath)) {
@@ -59,7 +65,14 @@ foreach($tool in $tools) {
Write-Host "Run validation test for $($tool.name)($($tool.arch)) $($foundVersion.name) executables..."
Run-ExecutableTests -Executables $toolExecs -ToolPath $foundVersionPath
$foundVersionName = $foundVersion.name
if ($tool.name -eq 'PyPy')
{
$pypyVersion = & "$foundVersionPath/bin/python" -c "import sys;print(sys.version.split('\n')[1])"
$foundVersionName = "{0} {1}" -f $foundVersionName, $pypyVersion
}
# Add tool version to documentation
Invoke-Expression "bash -c `"source $env:HELPER_SCRIPTS/document.sh; DocumentInstalledItemIndent '$($tool.name) $($foundVersion.name)'`""
Invoke-Expression "bash -c `"source $env:HELPER_SCRIPTS/document.sh; DocumentInstalledItemIndent '$($tool.name) $foundVersionName'`""
}
}