new setting:
python-env.searchPaths: []
it can be the following:
- an executable (/bin/python directly)
- can be the venv folder (if its just a folder, we search /bin/python)
- can be a regex command (we will search for this regex command)
(Supports regex but you should warn that this could cause efficiency concerns.)
given searchPaths we then need to make a FINALSEARCHSET.
- first use
await vscode.workspace.findFiles(xxxx, null); if there is a regex to find python. save the grand-grand folder of this executable and add it to FINALSEARCHSET
- next if there is a executable in
searchPaths then get the grand-grand folder of this executable and add it to FINALSEARCHSET
- if the
searchPaths item is a folder, just add it AS IS to FINALSEARCHSET
once we have FINALSEARCHSET we want to update configure in src/managers/common/nativePythonFinder.ts to include FINALSEARCHSET in environmentDirectories.
add some trace logging where needed. also when getting a final set and the environmentDirectories, make sure to remove duplicates.
new setting:
python-env.searchPaths: []it can be the following:
(Supports regex but you should warn that this could cause efficiency concerns.)
given
searchPathswe then need to make aFINALSEARCHSET.await vscode.workspace.findFiles(xxxx, null);if there is a regex to findpython. save the grand-grand folder of this executable and add it toFINALSEARCHSETsearchPathsthen get the grand-grand folder of this executable and add it toFINALSEARCHSETsearchPathsitem is a folder, just add it AS IS toFINALSEARCHSETonce we have
FINALSEARCHSETwe want to updateconfigureinsrc/managers/common/nativePythonFinder.tsto includeFINALSEARCHSETinenvironmentDirectories.add some trace logging where needed. also when getting a final set and the
environmentDirectories, make sure to remove duplicates.