Allow discovery of interpereters in virtual environments activated by a shim
Closes https://github.com/astral-sh/uv/issues/4009 Closes https://github.com/astral-sh/uv/issues/2109
Considering if this is the correct approach still. We should also test with the pyenv-virtualenv shim.
I find this implementation awkward as I only want this to be used if it's a virtual environment interpreter but we can't easily enforce that in python_executables. I'll probably poke at a better implementation.
I'd appreciate input on a better approach here.
Just confirming: still relevant to review? I know there was some back-and-forth on the issue but didn't read it deeply.
@charliermarsh yeah this is still necessary if we want to support detecting virtual environments that are only activated by an executable shim. I'm not in love with the implementation though.