Skip to content
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

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

Closed
cnpryer opened this issue Nov 16, 2023 · 0 comments · Fixed by #872
Closed

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

cnpryer opened this issue Nov 16, 2023 · 0 comments · Fixed by #872
Assignees
Milestone

Comments

@cnpryer
Copy link
Owner

cnpryer commented Nov 16, 2023

Summary

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

Motivation

  • pipx/cargo-like experience for installing packages as global tools
  • More ways to test toolchain implementation

Requirements

  • Can add to PATH
  • Can uninstall from
  • Self-contained

Questions

  • Should tools be installed with consistent Python installations?

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.

@cnpryer cnpryer added this to the General-use release milestone Nov 16, 2023
@cnpryer cnpryer changed the title Cargo's install using Huak's toolchain system Use Huak to install tools to a global toolchain Nov 22, 2023
@cnpryer cnpryer self-assigned this Nov 22, 2023
@cnpryer cnpryer changed the title Use Huak to install tools to a global toolchain Use Huak to install tools to a global *toolchain* Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant