Skip to content

new searchPath setting #821

@eleanorjboyd

Description

@eleanorjboyd

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions