Skip to content

Commit 4d71cde

Browse files
committed
PR Feedback.
1 parent 0d126f1 commit 4d71cde

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

utils/build.ps1

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -802,57 +802,57 @@ function Fetch-Dependencies {
802802
$Python = @{
803803
AMD64 = @{
804804
URL = "https://www.nuget.org/api/v2/package/python/$PythonVersion";
805-
Hash = "ac43b491e9488ac926ed31c5594f0c9409a21ecbaf99dc7a93f8c7b24cf85867";
805+
SHA256 = "ac43b491e9488ac926ed31c5594f0c9409a21ecbaf99dc7a93f8c7b24cf85867";
806806
};
807807
ARM64 = @{
808808
URL = "https://www.nuget.org/api/v2/package/pythonarm64/$PythonVersion";
809-
Hash = "429ada77e7f30e4bd8ff22953a1f35f98b2728e84c9b1d006712561785641f69";
809+
SHA256 = "429ada77e7f30e4bd8ff22953a1f35f98b2728e84c9b1d006712561785641f69";
810810
}
811811
}
812812

813-
DownloadAndVerify $Python[$ArchName].URL "$BinaryCache\Python$ArchName-$PythonVersion.zip" $Python[$ArchName].Hash
813+
DownloadAndVerify $Python[$ArchName].URL "$BinaryCache\Python$ArchName-$PythonVersion.zip" $Python[$ArchName].SHA256
814814
if (-not $ToBatch) {
815815
Extract-ZipFile Python$ArchName-$PythonVersion.zip "$BinaryCache" Python$ArchName-$PythonVersion
816816
}
817817
}
818818

819-
function Install-PythonWheel([string] $Python, [string] $ModuleName, [string] $WheelFile, [string] $WheelURL, [string] $WheelHash) {
819+
function Install-PythonWheel([string] $ModuleName, [string] $WheelFile, [string] $WheelURL, [string] $WheelHash) {
820820
try {
821-
Invoke-Program -OutNull $Python -c "import $ModuleName" *> $null
821+
Invoke-Program "$(Get-PythonExecutable)" -c "import $ModuleName" *> $null
822822
} catch {
823823
DownloadAndVerify $WheelURL "$BinaryCache\python\$WheelFile" $WheelHash
824824
Write-Output "Installing '$WheelFile' ..."
825-
Invoke-Program -OutNull $Python '-I' -m pip install "$BinaryCache\python\$WheelFile" --disable-pip-version-check
825+
Invoke-Program -OutNull "$(Get-PythonExecutable)" '-I' -m pip install "$BinaryCache\python\$WheelFile" --disable-pip-version-check
826826
}
827827
}
828828

829-
function Install-PythonModules([string] $Python) {
829+
function Install-PythonModules() {
830830
# First ensure pip is installed, else bootstrap it
831831
try {
832-
Invoke-Program -OutNull $Python -m pip *> $null
832+
Invoke-Program "$(Get-PythonExecutable)" -m pip *> $null
833833
} catch {
834834
Write-Output "Installing pip ..."
835-
Invoke-Program -OutNull $Python '-I' -m ensurepip -U --default-pip
835+
Invoke-Program -OutNull "$(Get-PythonExecutable)" '-I' -m ensurepip -U --default-pip
836836
}
837837

838838
# 'packaging' is required for building LLVM 18+
839-
Install-PythonWheel $Python 'packaging' 'packaging-24.1-py3-none-any.whl' `
839+
Install-PythonWheel 'packaging' 'packaging-24.1-py3-none-any.whl' `
840840
'https://files.pythonhosted.org/packages/08/aa/cc0199a5f0ad350994d660967a8efb233fe0416e4639146c089643407ce6/packaging-24.1-py3-none-any.whl' `
841841
'5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124'
842842

843843
# 'setuptools' provides 'distutils' module for Python 3.12+, required for SWIG support
844-
Install-PythonWheel $Python 'distutils' 'setuptools-75.1.0-py3-none-any.whl' `
844+
Install-PythonWheel 'distutils' 'setuptools-75.1.0-py3-none-any.whl' `
845845
'https://files.pythonhosted.org/packages/ff/ae/f19306b5a221f6a436d8f2238d5b80925004093fa3edea59835b514d9057/setuptools-75.1.0-py3-none-any.whl' `
846846
'35ab7fd3bcd95e6b7fd704e4a1539513edad446c097797f2985e0e4b960772f2'
847847

848848
if ($Test -contains "lldb") {
849849
# 'psutil' is required for testing LLDB
850-
Install-PythonWheel $Python 'psutil' 'psutil-6.1.0-cp37-abi3-win_amd64.whl' `
850+
Install-PythonWheel 'psutil' 'psutil-6.1.0-cp37-abi3-win_amd64.whl' `
851851
'https://files.pythonhosted.org/packages/11/91/87fa6f060e649b1e1a7b19a4f5869709fbf750b7c8c262ee776ec32f3028/psutil-6.1.0-cp37-abi3-win_amd64.whl' `
852852
'a8fb3752b491d246034fa4d279ff076501588ce8cbcdbb62c32fd7a377d996be'
853853

854854
# 'unittest2' is required for testing LLDB
855-
Install-PythonWheel $Python 'unittest2' 'unittest2-1.1.0-py2.py3-none-any.whl' `
855+
Install-PythonWheel 'unittest2' 'unittest2-1.1.0-py2.py3-none-any.whl' `
856856
'https://files.pythonhosted.org/packages/72/20/7f0f433060a962200b7272b8c12ba90ef5b903e218174301d0abfd523813/unittest2-1.1.0-py2.py3-none-any.whl' `
857857
'13f77d0875db6d9b435e1d4f41e74ad4cc2eb6e1d5c824996092b3430f088bb8'
858858
}
@@ -863,7 +863,7 @@ function Fetch-Dependencies {
863863
Install-Python $BuildArchName
864864
}
865865
# Ensure Python modules that are required as host build tools
866-
Install-PythonModules "$(Get-PythonExecutable)"
866+
Install-PythonModules
867867

868868
if ($Android) {
869869
# Only a specific NDK version is supported right now.

0 commit comments

Comments
 (0)