@@ -105,22 +105,26 @@ def version_check(commit):
105
105
print ("version check failed" , e )
106
106
107
107
108
+ def run_extension_installer (extension_dir ):
109
+ path_installer = os .path .join (extension_dir , "install.py" )
110
+ if not os .path .isfile (path_installer ):
111
+ return
112
+
113
+ try :
114
+ env = os .environ .copy ()
115
+ env ['PYTHONPATH' ] = os .path .abspath ("." )
116
+
117
+ print (run (f'"{ python } " "{ path_installer } "' , errdesc = f"Error running install.py for extension { extension_dir } " , custom_env = env ))
118
+ except Exception as e :
119
+ print (e , file = sys .stderr )
120
+
121
+
108
122
def run_extensions_installers ():
109
123
if not os .path .isdir (dir_extensions ):
110
124
return
111
125
112
126
for dirname_extension in os .listdir (dir_extensions ):
113
- path_installer = os .path .join (dir_extensions , dirname_extension , "install.py" )
114
- if not os .path .isfile (path_installer ):
115
- continue
116
-
117
- try :
118
- env = os .environ .copy ()
119
- env ['PYTHONPATH' ] = os .path .abspath ("." )
120
-
121
- print (run (f'"{ python } " "{ path_installer } "' , errdesc = f"Error running install.py for extension { dirname_extension } " , custom_env = env ))
122
- except Exception as e :
123
- print (e , file = sys .stderr )
127
+ run_extension_installer (os .path .join (dir_extensions , dirname_extension ))
124
128
125
129
126
130
def prepare_enviroment ():
0 commit comments