-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a common cross-platform "Python installation finder" library? #2
Comments
Hey @zooba just to follow on from @ncoghlan I have created https://github.com/techalchemy/pythonfinder which has this library vendored, but currently runs into a few issues on windows, should I pr them over to here or, what would be the best way to handle this? /cc @pfmoore who I know has an interest in this |
@techalchemy PRs over here would be great. Happy to merge changes. |
Just as a follow up since I know I've spoken to all of you independently and there is simultaneous re-work being done on this tooling for both windows and linux, is there a centralized place where it would make sense to focus the higher level discussions about the kind of consumption-level API design? Or is it safe to assume that whatever the implementation details are, the final APIs will be compatible? /cc @brettcannon |
It's really up to the people who are planning to write the other implementations. I don't have any intention on trying to standardize the specific API here (though the metadata, structure, and extensibility points in PEP 514 are already standardized, so I'd hope a shared API is at least compatible with those). I suspect the first step is to define the way that PEP 514 can be cross-platform, such that interpreters can provide equivalent metadata about themselves. Without that, it'll all be pretty ad hoc. |
The other question is whether this desired API is meant to be consumed by executing a shell command or via some library? As of right now, other than potentially supporting And all of this is predicated on the idea that I actually finish the Python launcher for UNIX and it actually goes somewhere. 😉 |
This idea will presumably be deemed out-of-scope for pep514tools itself, but I figure it's as good a place as any to start an initial discussion, since searching the Windows registry is the most complex platform-specific discovery option.
In a recent python-ideas discussion, @GadgetSteve suggested it might be desirable for
pip
to directly support Python Launcher for Windows style version selection arguments (pip -2 install
,pip -3 install
, etc).I then mentioned that the
--python
option inpipenv
already worked much like that, and @pfmoore mentioned this project as being relevant to the Windows case.Looking at the
pipenv
code, that currently relies primarily onPATH
scanning: https://github.com/kennethreitz/pipenv/blob/d320bc4b1e/pipenv/cli.py#L348It then also has some native support for the
pyenv
environment manager (although that part may not work on Windows): https://github.com/kennethreitz/pipenv/blob/d320bc4b1e/pipenv/cli.py#L394(If we decide to move the discussion away from here, then PyPA's "python packaging problems" would likely be the best place - this becomes a packaging problem by virtue of the fact that packaging tools need to figure out which environment to operate on when they're not just relying on
sys.executable
)The text was updated successfully, but these errors were encountered: