Open davidwinter opened 3 months ago
@davidwinter We do create pip files, but only shims: https://github.com/moonrepo/python-plugin/blob/master/src/proto.rs#L153
Is ~/.proto/shims
in your PATH
?
@milesj it is 👍
>: echo $PATH
/Users/davidwinter/.proto/shims /Users/davidwinter/.proto/bin /Users/davidwinter/.cargo/bin <...snip>
@davidwinter Oh I misread the post, I thought pip wasn't available, not the tool it installed.
So proto doesn't update PATH
with the location of globally installed binaries. For some tools like rust and deno this is super easy since the install path is always the same, but others like python changes between versions. We haven't figured out a nice way to handle this yet that works with shims.
@milesj no worries. That's a shame though. I wonder what mechanism asdf
uses for achieving this - unless you're already aware?
The value from this output for Global packages directory
is that hardcoded or something? A reason we couldn't use this for the tool?
>: proto tool info python
python - Python
Plugin
Version: 0.10.1
URL: https://github.com/moonrepo/python-plugin/releases/download/v0.10.1/python_plugin.wasm
Inventory
Store: ~/.proto/tools/python
Executable: ~/.proto/tools/python/3.12.3/install/bin/python3.12
Global packages directory: ~/.proto/tools/python/3.12.3/install/bin
Binaries:
- ~/.proto/bin/python (primary)
- ~/.proto/bin/python3
Shims:
- ~/.proto/shims/python (primary)
- ~/.proto/shims/pip
- ~/.proto/shims/python3
Installed versions:
- 3.12.3
We do have a list of global paths that we check for, but we have no way to inject that into the PATH
currently.
I'll look into how mise is handling things. The only thing I'm worried about is the initial overhead of having to download wasm plugins.
If you're still using proto, the next release attempts to solve this. I published an alpha:
https://github.com/moonrepo/proto/releases
And some info on the command/workflow:
Amazing - thanks - I'll give this a try tomorrow 👍
Apologies if I've misunderstood what to expect - I'm a user coming from
asdf
and attempting to migrate toproto
due to it's cross-platform nature - amazing work everyone!I was expecting that if I was to run
pip install cpplint
or similiar, which normally would provide thecpplint
executable available within my path immediately afterwards. I can see the file within~/.proto/tools/python/3.12.3/install/bin
though it's not available on my path. I've triedproto regen
but to no avail.Any advice or guidance would be much appreciated. Thanks.
Proto:
0.36.2
Python plugin:0.10.1
Python version:3.12.3