@@ -213,7 +213,7 @@ function getAllowedWarningsForWebPack(buildConfig) {
213
213
}
214
214
}
215
215
gulp . task ( 'renameSourceMaps' , async ( ) => {
216
- // By default souce maps will be disabled in the extenion .
216
+ // By default source maps will be disabled in the extension .
217
217
// Users will need to use the command `python.enableSourceMapSupport` to enable source maps.
218
218
const extensionSourceMap = path . join ( __dirname , 'out' , 'client' , 'extension.js.map' ) ;
219
219
const debuggerSourceMap = path . join ( __dirname , 'out' , 'client' , 'debugger' , 'debugAdapter' , 'main.js.map' ) ;
@@ -257,20 +257,33 @@ gulp.task('installPythonRequirements', async () => {
257
257
) ;
258
258
} ) ;
259
259
260
- // Install new PTVSD wheels for python 3.7
260
+
261
261
// See https://github.com/microsoft/vscode-python/issues/7136
262
- gulp . task ( 'installPtvsdWheels ' , async ( ) => {
263
- const args = [ './pythonFiles/install_ptvsd.py' ]
264
- const success = await spawnAsync ( process . env . CI_PYTHON_PATH || 'python3' , args )
262
+ gulp . task ( 'installNewPtvsd ' , async ( ) => {
263
+ // Install new PTVSD with wheels for python 3.7
264
+ const successWithWheels = await spawnAsync ( process . env . CI_PYTHON_PATH || 'python3' , './pythonFiles/install_ptvsd.py' )
265
265
. then ( ( ) => true )
266
266
. catch ( ex => {
267
267
console . error ( "Failed to install new PTVSD wheels using 'python3'" , ex ) ;
268
268
return false ;
269
269
} ) ;
270
- if ( ! success ) {
270
+ if ( ! successWithWheels ) {
271
271
console . info ( "Failed to install new PTVSD wheels using 'python3', attempting to install using 'python'" ) ;
272
272
await spawnAsync ( 'python' , args ) . catch ( ex => console . error ( "Failed to install PTVSD 5.0 wheels using 'python'" , ex ) ) ;
273
273
}
274
+
275
+ // Install source only version of new PTVSD for use with all other python versions.
276
+ const args = [ '-m' , 'pip' , '--disable-pip-version-check' , 'install' , '-t' , './pythonFiles/lib/python/new_ptvsd/no_wheels' , '--no-cache-dir' , '--implementation' , 'py' , '--no-deps' , '--upgrade' , 'ptvsd==5.0.0a8' ]
277
+ const successWithoutWheels = await spawnAsync ( process . env . CI_PYTHON_PATH || 'python3' , args )
278
+ . then ( ( ) => true )
279
+ . catch ( ex => {
280
+ console . error ( "Failed to install PTVSD using 'python3'" , ex ) ;
281
+ return false ;
282
+ } ) ;
283
+ if ( ! successWithoutWheels ) {
284
+ console . info ( "Failed to install source only version of new PTVSD using 'python3', attempting to install using 'python'" ) ;
285
+ await spawnAsync ( 'python' , args ) . catch ( ex => console . error ( "Failed to install source only PTVSD 5.0 using 'python'" , ex ) ) ;
286
+ }
274
287
} ) ;
275
288
276
289
// Install the last stable version of old PTVSD (which includes a middle layer adapter and requires ptvsd_launcher.py)
@@ -290,7 +303,7 @@ gulp.task('installOldPtvsd', async () => {
290
303
}
291
304
} ) ;
292
305
293
- gulp . task ( 'installPythonLibs' , gulp . series ( 'installPythonRequirements' , 'installOldPtvsd' , 'installPtvsdWheels ' ) ) ;
306
+ gulp . task ( 'installPythonLibs' , gulp . series ( 'installPythonRequirements' , 'installOldPtvsd' , 'installNewPtvsd ' ) ) ;
294
307
295
308
function uploadExtension ( uploadBlobName ) {
296
309
const azure = require ( 'gulp-azure-storage' ) ;
0 commit comments