Open Turakar opened 1 month ago
Ok, you can kinda do this already by passing UV_PYTHON_INSTALL_DIR
(docs) to uv venv
.
I think we want to add this feature.
Ohh til UV_PYTHON_INSTALL_DIR
exists.
I was looking for this parameter in CLI --help
and it's not mentioned there.
Perhaps
uv python *
docsuv python install *
commands should take an --install-dir
argument? Yes we should mention it in the help documentation. I'd also be down to accept a target directory in the CLI.
Ok, I started working on this in #7920. Does --install-dir
name work?
For system wide installations of applications build with
uv
, it would be nice to have an option to build an execution environment which is self contained and does not rely on the user's local files (~/.local/share/uv
). My usecase for this would be an application that I want to install to a server for system-wide usage. At the moment, you can achieve this with the following commands (with some path adjustments):I.e., you can replace the symlinked python interpreter by a bundled copy.
I am not entirely sure how this should be implemented. In a first simple step, one could add a
--bundle-python
flag touv venv
which copies the downloaded Python interpreter to, e.g.,.venv/python
and uses it instead of a path in~/.local/share/uv
.However, you can take this idea further, up to a
uv install
command which would do something similar tomake install
.