@@ -226,6 +226,23 @@ gulp.task('prePublishBundle', gulp.series('webpack', 'renameSourceMaps'));
226226gulp . task ( 'checkDependencies' , gulp . series ( 'checkNativeDependencies' ) ) ;
227227gulp . task ( 'prePublishNonBundle' , gulp . series ( 'compile' ) ) ;
228228
229+ gulp . task ( 'preparePythonDeps' , async ( ) => {
230+ let args = [ '-m' , 'pip' , 'install' , '-U' , 'pip' ] ;
231+ await spawnAsync ( process . env . CI_PYTHON_PATH || 'python' , args , undefined , true )
232+ . then ( ( ) => true )
233+ . catch ( ( ex ) => {
234+ console . error ( "Failed to upgrade pip using 'python'" , ex ) ;
235+ return false ;
236+ } ) ;
237+ args = [ '-m' , 'pip' , 'install' , 'wheel' ] ;
238+ await spawnAsync ( process . env . CI_PYTHON_PATH || 'python' , args , undefined , true )
239+ . then ( ( ) => true )
240+ . catch ( ( ex ) => {
241+ console . error ( "Failed to install wheel requirement using 'python'" , ex ) ;
242+ return false ;
243+ } ) ;
244+ } ) ;
245+
229246gulp . task ( 'installPythonRequirements' , async ( ) => {
230247 let args = [
231248 '-m' ,
@@ -308,7 +325,7 @@ gulp.task('installDebugpy', async () => {
308325 rmrf . sync ( './pythonFiles/lib/temp' ) ;
309326} ) ;
310327
311- gulp . task ( 'installPythonLibs' , gulp . series ( 'installPythonRequirements' , 'installDebugpy' ) ) ;
328+ gulp . task ( 'installPythonLibs' , gulp . series ( 'preparePythonDeps' , ' installPythonRequirements', 'installDebugpy' ) ) ;
312329
313330function spawnAsync ( command , args , env , rejectOnStdErr = false ) {
314331 env = env || { } ;
0 commit comments