@@ -338,29 +338,6 @@ $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
-
364
341
$KnownNDKs = @ {
365
342
r26b = @ {
366
343
URL = " https://dl.google.com/android/repository/android-ndk-r26b-windows.zip"
@@ -1007,32 +984,25 @@ function Get-Dependencies {
1007
984
}
1008
985
}
1009
986
1010
- function Install-PythonWheel ([string ] $ModuleName ) {
987
+ function Install-PythonModule ([string ] $ModuleName , [ string ] $ModuleVersion ) {
1011
988
try {
1012
989
Invoke-Program - Silent " $ ( Get-PythonExecutable ) " - c " import $ModuleName "
1013
990
} catch {
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
991
+ Write-Output " Installing '$ ( $ModuleName ) ' ..."
992
+ Invoke-Program - OutNull " $ ( Get-PythonExecutable ) " ' -I' - m pip install " $ModuleName ==$ModuleVersion " -- disable-pip - version- check
1018
993
} finally {
1019
994
Write-Output " $ModuleName installed."
1020
995
}
1021
996
}
1022
997
1023
998
function Install-PythonModules () {
1024
999
Install-PIPIfNeeded
1025
- Install-PythonWheel " packaging" # For building LLVM 18+
1026
- Install-PythonWheel " distutils" # Required for SWIG support
1000
+ Install-PythonModule " packaging" " 24.1 " # For building LLVM 18+
1001
+ Install-PythonModule " distutils" " 75.1.0 " # Required for SWIG support
1027
1002
if ($Test -contains " 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
- }
1003
+ Install-PythonModule " psutil" " 6.1.0" # Required for testing LLDB
1034
1004
$env: Path = " $ ( Get-PythonScriptsPath ) ;$env: Path " # For unit.exe
1035
- Install-PythonWheel " unittest2" # Required for testing LLDB
1005
+ Install-PythonModule " unittest2" " 1.1.0 " # Required for testing LLDB
1036
1006
}
1037
1007
}
1038
1008
0 commit comments