@@ -340,48 +340,20 @@ $KnownPythons = @{
340340
341341$PythonModules = @ {
342342 " packaging" = @ {
343- Wheel = @ {
344- File = " packaging-24.1-py3-none-any.whl" ;
345- URL = " https://files.pythonhosted.org/packages/08/aa/cc0199a5f0ad350994d660967a8efb233fe0416e4639146c089643407ce6/packaging-24.1-py3-none-any.whl" ;
346- SHA256 = " 5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124" ;
347- };
348- Module = @ {
349- Version = " 24.1" ;
350- SHA256 = " 026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" ;
351- };
343+ Version = " 24.1" ;
344+ SHA256 = " 026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" ;
352345 };
353346 " setuptools" = @ {
354- Wheel = @ {
355- File = " setuptools-75.1.0-py3-none-any.whl" ;
356- URL = " https://files.pythonhosted.org/packages/ff/ae/f19306b5a221f6a436d8f2238d5b80925004093fa3edea59835b514d9057/setuptools-75.1.0-py3-none-any.whl" ;
357- SHA256 = " 35ab7fd3bcd95e6b7fd704e4a1539513edad446c097797f2985e0e4b960772f2" ;
358- };
359- Module = @ {
360- Version = " 75.1.0" ;
361- SHA256 = " d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" ;
362- };
347+ Version = " 75.1.0" ;
348+ SHA256 = " d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538" ;
363349 };
364350 " psutil" = @ {
365- Wheel = @ {
366- File = " psutil-6.1.0-cp37-abi3-win_amd64.whl" ;
367- URL = " https://files.pythonhosted.org/packages/11/91/87fa6f060e649b1e1a7b19a4f5869709fbf750b7c8c262ee776ec32f3028/psutil-6.1.0-cp37-abi3-win_amd64.whl" ;
368- SHA256 = " a8fb3752b491d246034fa4d279ff076501588ce8cbcdbb62c32fd7a377d996be" ;
369- };
370- Module = @ {
371- Version = " 6.1.0" ;
372- SHA256 = " 353815f59a7f64cdaca1c0307ee13558a0512f6db064e92fe833784f08539c7a" ;
373- };
351+ Version = " 6.1.0" ;
352+ SHA256 = " 353815f59a7f64cdaca1c0307ee13558a0512f6db064e92fe833784f08539c7a" ;
374353 };
375354 " unittest2" = @ {
376- Wheel = @ {
377- File = " unittest2-1.1.0-py2.py3-none-any.whl" ;
378- URL = " https://files.pythonhosted.org/packages/72/20/7f0f433060a962200b7272b8c12ba90ef5b903e218174301d0abfd523813/unittest2-1.1.0-py2.py3-none-any.whl" ;
379- SHA256 = " 13f77d0875db6d9b435e1d4f41e74ad4cc2eb6e1d5c824996092b3430f088bb8" ;
380- };
381- Module = @ {
382- Version = " 1.1.0" ;
383- SHA256 = " 22882a0e418c284e1f718a822b3b022944d53d2d908e1690b319a9d3eb2c0579" ;
384- }
355+ Version = " 1.1.0" ;
356+ SHA256 = " 22882a0e418c284e1f718a822b3b022944d53d2d908e1690b319a9d3eb2c0579" ;
385357 };
386358}
387359
@@ -1040,28 +1012,16 @@ function Get-Dependencies {
10401012 }
10411013 }
10421014
1043- function Install-PythonWheel ([string ] $ModuleName ) {
1044- $Wheel = $PythonModules [$ModuleName ][" Wheel" ]
1045- DownloadAndVerify $Wheel.URL " $BinaryCache \python\$ ( $Wheel.File ) " $Wheel.SHA256
1046- Write-Output " Installing '$ ( $Wheel.File ) ' ..."
1047- Invoke-Program - OutNull " $ ( Get-PythonExecutable ) " ' -I' - m pip install " $BinaryCache \python\$ ( $Wheel.File ) " -- disable-pip - version- check
1048- }
1049-
10501015 function Install-PythonModule ([string ] $ModuleName ) {
10511016 if (Test-PythonModuleInstalled $ModuleName ) {
10521017 Write-Output " $ModuleName already installed."
10531018 return ;
10541019 }
1055- try {
1056- Install-PythonWheel $ModuleName
1057- } catch {
1058- $TempRequirementsTxt = New-TemporaryFile
1059- $Module = $PythonModules [$ModuleName ][" Module" ]
1060- Write-Output " $ModuleName ==$ ( $Module.Version ) --hash=`" sha256:$ ( $Module.SHA256 ) `" " >> $TempRequirementsTxt
1061- Invoke-Program - OutNull " $ ( Get-PythonExecutable ) " ' -I' - m pip install - r $TempRequirementsTxt -- require- hashes -- no- binary== :all: -- disable-pip - version- check
1062- } finally {
1063- Write-Output " $ModuleName installed."
1064- }
1020+ $TempRequirementsTxt = New-TemporaryFile
1021+ $Module = $PythonModules [$ModuleName ]
1022+ Write-Output " $ModuleName ==$ ( $Module.Version ) --hash=`" sha256:$ ( $Module.SHA256 ) `" " >> $TempRequirementsTxt
1023+ Invoke-Program - OutNull " $ ( Get-PythonExecutable ) " ' -I' - m pip install - r $TempRequirementsTxt -- require- hashes -- no- binary== :all: -- disable-pip - version- check
1024+ Write-Output " $ModuleName installed."
10651025 }
10661026
10671027 function Install-PythonModules () {
0 commit comments