fix pkg name
This commit is contained in:
parent
7af2663514
commit
6a0e665496
|
@ -84,19 +84,32 @@ class macOSPythonBuilder : NixPythonBuilder {
|
|||
Execute-Command -Command $configureString
|
||||
}
|
||||
|
||||
[uri] GetPkgUri() {
|
||||
[string] GetPkgName() {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Get base Python URI and return complete URI for Python installation executable.
|
||||
Return Python installation Package.
|
||||
#>
|
||||
|
||||
$base = $this.GetBaseUri()
|
||||
$versionName = $this.GetBaseVersion()
|
||||
$nativeVersion = Convert-Version -version $this.Version
|
||||
$architecture = "-macos11"
|
||||
$extension = ".pkg"
|
||||
|
||||
$uri = "${base}/${versionName}/python-${nativeVersion}${architecture}${extension}"
|
||||
$pkg = "python-${nativeVersion}${architecture}${extension}"
|
||||
|
||||
return $pkg
|
||||
}
|
||||
|
||||
[uri] GetPkgUri() {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Get base Python URI and return complete URI for Python installation package.
|
||||
#>
|
||||
|
||||
$base = $this.GetBaseUri()
|
||||
$versionName = $this.GetBaseVersion()
|
||||
$pkg = $this.GetPkgName()
|
||||
|
||||
$uri = "${base}/${versionName}/${pkg}"
|
||||
|
||||
return $uri
|
||||
}
|
||||
|
@ -129,6 +142,7 @@ class macOSPythonBuilder : NixPythonBuilder {
|
|||
|
||||
$variablesToReplace = @{
|
||||
"{{__VERSION_FULL__}}" = $this.Version;
|
||||
"{{__PKG_NAME__}}" = $this.GetPkgName();
|
||||
}
|
||||
|
||||
$variablesToReplace.keys | ForEach-Object { $installationTemplateContent = $installationTemplateContent.Replace($_, $variablesToReplace[$_]) }
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
set -e
|
||||
|
||||
PYTHON_FULL_VERSION="{{__VERSION_FULL__}}"
|
||||
PYTHON_PKG_NAME="{{__PKG_NAME__}}"
|
||||
MAJOR_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d '.' -f 1)
|
||||
MINOR_VERSION=$(echo $PYTHON_FULL_VERSION | cut -d '.' -f 2)
|
||||
|
||||
|
@ -35,7 +36,7 @@ else
|
|||
fi
|
||||
|
||||
echo "Install Python binaries from prebuilt package"
|
||||
sudo installer -pkg "python-${PYTHON_FULL_VERSION}-macos11.pkg" -target /
|
||||
sudo installer -pkg $PYTHON_PKG_NAME -target /
|
||||
rm $PYTHON_TOOLCACHE_VERSION_ARCH_PATH/setup.sh
|
||||
|
||||
echo "Create hostedtoolcach symlinks (Required for the backward compatibility)"
|
||||
|
|
Loading…
Reference in New Issue