@@ -338,6 +338,29 @@ $KnownPythons = @{
338
338
}
339
339
}
340
340
341
+ $PythonWheels = @ {
342
+ " packaging" = @ {
343
+ File = " packaging-24.1-py3-none-any.whl" ;
344
+ URL = " https://files.pythonhosted.org/packages/08/aa/cc0199a5f0ad350994d660967a8efb233fe0416e4639146c089643407ce6/packaging-24.1-py3-none-any.whl" ;
345
+ SHA256 = " 5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124" ;
346
+ };
347
+ " distutils" = @ {
348
+ File = " setuptools-75.1.0-py3-none-any.whl" ;
349
+ URL = " https://files.pythonhosted.org/packages/ff/ae/f19306b5a221f6a436d8f2238d5b80925004093fa3edea59835b514d9057/setuptools-75.1.0-py3-none-any.whl" ;
350
+ SHA256 = " 35ab7fd3bcd95e6b7fd704e4a1539513edad446c097797f2985e0e4b960772f2" ;
351
+ };
352
+ " psutil" = @ {
353
+ File = " psutil-6.1.0-cp37-abi3-win_amd64.whl" ;
354
+ URL = " https://files.pythonhosted.org/packages/11/91/87fa6f060e649b1e1a7b19a4f5869709fbf750b7c8c262ee776ec32f3028/psutil-6.1.0-cp37-abi3-win_amd64.whl" ;
355
+ SHA256 = " a8fb3752b491d246034fa4d279ff076501588ce8cbcdbb62c32fd7a377d996be" ;
356
+ };
357
+ " unittest2" = @ {
358
+ File = " unittest2-1.1.0-py2.py3-none-any.whl" ;
359
+ URL = " https://files.pythonhosted.org/packages/72/20/7f0f433060a962200b7272b8c12ba90ef5b903e218174301d0abfd523813/unittest2-1.1.0-py2.py3-none-any.whl" ;
360
+ SHA256 = " 13f77d0875db6d9b435e1d4f41e74ad4cc2eb6e1d5c824996092b3430f088bb8" ;
361
+ };
362
+ }
363
+
341
364
$KnownNDKs = @ {
342
365
r26b = @ {
343
366
URL = " https://dl.google.com/android/repository/android-ndk-r26b-windows.zip"
@@ -984,25 +1007,32 @@ function Get-Dependencies {
984
1007
}
985
1008
}
986
1009
987
- function Install-PythonModule ([string ] $ModuleName , [ string ] $ModuleVersion ) {
1010
+ function Install-PythonWheel ([string ] $ModuleName ) {
988
1011
try {
989
1012
Invoke-Program - Silent " $ ( Get-PythonExecutable ) " - c " import $ModuleName "
990
1013
} catch {
991
- Write-Output " Installing '$ ( $ModuleName ) ' ..."
992
- Invoke-Program - OutNull " $ ( Get-PythonExecutable ) " ' -I' - m pip install " $ModuleName ==$ModuleVersion " -- disable-pip - version- check
1014
+ $Wheel = $PythonWheels [$ModuleName ]
1015
+ DownloadAndVerify $Wheel.URL " $BinaryCache \python\$ ( $Wheel.File ) " $Wheel.SHA256
1016
+ Write-Output " Installing '$ ( $Wheel.File ) ' ..."
1017
+ Invoke-Program - OutNull " $ ( Get-PythonExecutable ) " ' -I' - m pip install " $BinaryCache \python\$ ( $Wheel.File ) " -- disable-pip - version- check
993
1018
} finally {
994
1019
Write-Output " $ModuleName installed."
995
1020
}
996
1021
}
997
1022
998
1023
function Install-PythonModules () {
999
1024
Install-PIPIfNeeded
1000
- Install-PythonModule " packaging" " 24.1 " # For building LLVM 18+
1001
- Install-PythonModule " distutils" " 75.1.0 " # Required for SWIG support
1025
+ Install-PythonWheel " packaging" # For building LLVM 18+
1026
+ Install-PythonWheel " distutils" # Required for SWIG support
1002
1027
if ($Test -contains " lldb" ) {
1003
- Install-PythonModule " psutil" " 6.1.0" # Required for testing LLDB
1028
+ if ($env: PROCESSOR_ARCHITECTURE -eq " ARM64" ) {
1029
+ Write-Output " Installing 'psutil' ..."
1030
+ Invoke-Program - OutNull " $ ( Get-PythonExecutable ) " ' -I' - m pip install " psutil==6.1.0" -- disable-pip - version- check
1031
+ } else {
1032
+ Install-PythonWheel " psutil" # Required for testing LLDB
1033
+ }
1004
1034
$env: Path = " $ ( Get-PythonScriptsPath ) ;$env: Path " # For unit.exe
1005
- Install-PythonModule " unittest2" " 1.1.0 " # Required for testing LLDB
1035
+ Install-PythonWheel " unittest2" # Required for testing LLDB
1006
1036
}
1007
1037
}
1008
1038
0 commit comments