-
Notifications
You must be signed in to change notification settings - Fork 34
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 manage virtual environments for projects #794
Comments
Considering just starting with #[derive(Subcommand)]
enum PythonEnvironment {
/// Use a Python environment for the current project.
Use {
/// The path to the Python environment.
#[arg(long)]
path: Option<PathBuf>,
/// The path to a project manifest file containing dependencies to install.
#[arg(long)]
manifest: Option<PathBuf>,
/// Requirements files containing PEP 508 requirements to install.
#[arg(long)]
requirements: Option<Vec<PathBuf>>,
/// Force the creation of the Python environment.
#[arg(short)]
force: bool,
},
} I want there to be clear need for this vs the
Here I'm looking to replace the current |
Thought through this some more. Im hesitant to commit time to this right now since the experience I want from Huak is one where you don't even know the virtual environment is there or is being used. I don't want to open this door until I've thought about it some more. |
cc #890 |
Summary
Allow for users to use Huak to manage virtual environments for projects.
Motivation
Currently Huak will resolve a Python environment to use for each command. It does this by searching for a virutal environment to use or by creating a new one. This isn't exposed well to users. Adding features for more control over this process would help make Huak easier to use.
The goal is for Huak to manage things like project virtual environments without having to burden the user, but if the user ever needs to manage their project's virtual environment there should be a way to do it.
Requirements
install
command easier (see Use Huak to install tools to a global *toolchain* #850)Details
At the workspace level a project can be given a virtual environment to use
.venv
. Per-project users may want to change what virtual environment Huak uses. Thepython
subcommand is meant to be reserved for managing and interacting with Python.(WIP; see comment)
Entered to a environments.toml in Huak's home directory:
The text was updated successfully, but these errors were encountered: