cnpryer / huak

My experimental Python package manager.
https://cnpryer.github.io/huak/
MIT License
615 stars 37 forks source link

Use Huak to install tools to a global *toolchain* #850

Closed cnpryer closed 9 months ago

cnpryer commented 10 months ago

Summary

huak install <target> could install a Python project to a global toolchain dedicated to path discovery.

Motivation

Requirements

Questions

Details

An env file can be added similar to Cargo

❯ cat ~/.cargo/env 
#!/bin/sh
# rustup shell setup
# affix colons on either side of $PATH to simplify matching
case ":${PATH}:" in
    *:"$HOME/.cargo/bin":*)
        ;;
    *)
        # Prepending path in case a system-installed rustc needs to be overridden
        export PATH="$HOME/.cargo/bin:$PATH"
        ;;
esac

(WIP) The file would add ~/.huak/env the same way so that users can run packages added to Huak's ~/.huak/bin.

huak install ruff
which ruff
~/.huak/toolchains/global/bin/ruff

I can use the toolchain system to manage the bin directory with an isolated installation of Python.