diff --git a/package.json b/package.json index 01093c06b350..cb71cde00fd8 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,8 @@ "onCommand:jupyter.execCurrentCell", "onCommand:jupyter.execCurrentCellAndAdvance", "onCommand:python.displayHelp", - "onCommand:python.buildWorkspaceSymbols" + "onCommand:python.buildWorkspaceSymbols", + "onCommand:python.updateSparkLibrary" ], "main": "./out/client/extension", "contributes": { @@ -419,7 +420,15 @@ "type": "python", "request": "launch", "stopOnEntry": true, - "pythonPath": "${config.python.pysparkPath}", + "osx": { + "pythonPath": "${env.SPARK_HOME}/bin/spark-submit" + }, + "windows": { + "pythonPath": "${env.SPARK_HOME}/bin/spark-submit.cmd" + }, + "linux": { + "pythonPath": "${env.SPARK_HOME}/bin/spark-submit" + }, "program": "${file}", "cwd": "${workspaceRoot}", "debugOptions": [ @@ -567,11 +576,6 @@ "default": "python", "description": "Path to Python, you can use a custom version of Python by modifying this setting to include the full path." }, - "python.pysparkPath": { - "type": "string", - "default": "${env.SPARK_HOME}/bin/spark-submit", - "description": "Path to spark-submit executable, you can use a custom version of Spark by modifying this setting to include the full path." - }, "python.jediPath": { "type": "string", "default": "", diff --git a/src/client/providers/updateSparkLibraryProvider.ts b/src/client/providers/updateSparkLibraryProvider.ts index e613bb1542f8..6106ff0fec61 100644 --- a/src/client/providers/updateSparkLibraryProvider.ts +++ b/src/client/providers/updateSparkLibraryProvider.ts @@ -19,16 +19,6 @@ function updateSparkLibrary() { }, reason => { vscode.window.showErrorMessage(`Failed to update ${extraLibPath}. Error: ${reason.message}`); console.error(reason); - }); - if (IS_WINDOWS) { - const pysparkPath = 'pysparkPath'; - console.log('Overriding ' + pysparkPath); - pythonConfig.update(pysparkPath, path.join(sparkHomePath, 'bin', 'spark-submit.cmd')).then(() => { - //Done - }, reason => { - vscode.window.showErrorMessage(`Failed to update ${pysparkPath}. Error: ${reason.message}`); - console.error(reason); - }); - } + }); vscode.window.showInformationMessage(`Make sure you have SPARK_HOME environment variable set to the root path of the local spark installation!`); } \ No newline at end of file