1- :: Copyright 2019 NVIDIA CORPORATION
1+ :: Copyright 2019-2023 NVIDIA CORPORATION
22::
33:: Licensed under the Apache License, Version 2.0 (the "License");
44:: you may not use this file except in compliance with the License.
1212:: See the License for the specific language governing permissions and
1313:: limitations under the License.
1414
15- set PM_PACKMAN_VERSION = 6.56
15+ set PM_PACKMAN_VERSION = 7.10.1
1616
1717:: Specify where packman command is rooted
1818set PM_INSTALL_PATH = %~dp0 ..
@@ -59,7 +59,7 @@ if defined PM_PYTHON_EXT (
5959 goto PACKMAN
6060)
6161
62- set PM_PYTHON_VERSION = 3.7.13-nv1 -windows-x86_64
62+ set PM_PYTHON_VERSION = 3.10.5-1 -windows-x86_64
6363set PM_PYTHON_BASE_DIR = %PM_PACKAGES_ROOT% \python
6464set PM_PYTHON_DIR = %PM_PYTHON_BASE_DIR% \%PM_PYTHON_VERSION%
6565set PM_PYTHON = %PM_PYTHON_DIR% \python.exe
@@ -95,11 +95,16 @@ if exist "%PM_PYTHON%" (
9595 if exist " %PM_PYTHON_DIR% " ( rd /s /q " %PM_PYTHON_DIR% " > nul )
9696)
9797
98- :: Perform atomic rename
99- rename " %TEMP_FOLDER_NAME% " " %PM_PYTHON_VERSION% " 1 > nul
100- :: Failure during move, need to clean up and abort
98+ :: Perform atomic move (allowing ovewrite, /y)
99+ move /y " %TEMP_FOLDER_NAME% " " %PM_PYTHON_DIR% " 1 > nul
100+ :: Verify that python.exe is now where we expect
101+ if exist " %PM_PYTHON% " goto PACKMAN
102+
103+ :: Wait a second and try again (can help with access denied weirdness)
104+ timeout /t 1 /nobreak 1 > nul
105+ move /y " %TEMP_FOLDER_NAME% " " %PM_PYTHON_DIR% " 1 > nul
101106if %errorlevel% neq 0 (
102- echo !!! Error renaming python ! !!
107+ echo !!! Error moving python %TEMP_FOLDER_NAME% -> %PM_PYTHON_DIR% ! !!
103108 call :CLEAN_UP_TEMP_FOLDER
104109 goto ERROR
105110)
@@ -114,7 +119,7 @@ if defined PM_MODULE_DIR_EXT (
114119
115120set PM_MODULE = %PM_MODULE_DIR% \run.py
116121
117- if exist " %PM_MODULE% " goto ENSURE_7ZA
122+ if exist " %PM_MODULE% " goto END
118123
119124:: Clean out broken PM_MODULE_DIR if it exists
120125if exist " %PM_MODULE_DIR% " ( rd /s /q " %PM_MODULE_DIR% " > nul )
@@ -137,19 +142,6 @@ if %errorlevel% neq 0 (
137142
138143del " %TARGET% "
139144
140- :ENSURE_7ZA
141- set PM_7Za_VERSION = 22.01-1
142- set PM_7Za_PATH = %PM_PACKAGES_ROOT% \7za\%PM_7ZA_VERSION%
143- if exist " %PM_7Za_PATH% " goto END
144- set PM_7Za_PATH = %PM_PACKAGES_ROOT% \chk\7za\%PM_7ZA_VERSION%
145- if exist " %PM_7Za_PATH% " goto END
146-
147- " %PM_PYTHON% " -S -s -u -E " %PM_MODULE% " pull " %PM_MODULE_DIR% \deps.packman.xml"
148- if %errorlevel% neq 0 (
149- echo !!! Error fetching packman dependencies ! !!
150- goto ERROR
151- )
152-
153145goto END
154146
155147:ERROR_MKDIR_PACKAGES_ROOT
0 commit comments