@@ -213,7 +213,7 @@ function getAllowedWarningsForWebPack(buildConfig) {
213213 }
214214}
215215gulp . 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 .
217217 // Users will need to use the command `python.enableSourceMapSupport` to enable source maps.
218218 const extensionSourceMap = path . join ( __dirname , 'out' , 'client' , 'extension.js.map' ) ;
219219 const debuggerSourceMap = path . join ( __dirname , 'out' , 'client' , 'debugger' , 'debugAdapter' , 'main.js.map' ) ;
@@ -257,20 +257,33 @@ gulp.task('installPythonRequirements', async () => {
257257 ) ;
258258} ) ;
259259
260- // Install new PTVSD wheels for python 3.7
260+
261261// 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' )
265265 . then ( ( ) => true )
266266 . catch ( ex => {
267267 console . error ( "Failed to install new PTVSD wheels using 'python3'" , ex ) ;
268268 return false ;
269269 } ) ;
270- if ( ! success ) {
270+ if ( ! successWithWheels ) {
271271 console . info ( "Failed to install new PTVSD wheels using 'python3', attempting to install using 'python'" ) ;
272272 await spawnAsync ( 'python' , args ) . catch ( ex => console . error ( "Failed to install PTVSD 5.0 wheels using 'python'" , ex ) ) ;
273273 }
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+ }
274287} ) ;
275288
276289// 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 () => {
290303 }
291304} ) ;
292305
293- gulp . task ( 'installPythonLibs' , gulp . series ( 'installPythonRequirements' , 'installOldPtvsd' , 'installPtvsdWheels ' ) ) ;
306+ gulp . task ( 'installPythonLibs' , gulp . series ( 'installPythonRequirements' , 'installOldPtvsd' , 'installNewPtvsd ' ) ) ;
294307
295308function uploadExtension ( uploadBlobName ) {
296309 const azure = require ( 'gulp-azure-storage' ) ;
0 commit comments