Skip to content

Commit

Permalink
Still do conda run for uv (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt authored Jan 7, 2025
1 parent df93df8 commit 075893b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions unidep/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,14 @@ def _pip_install_local(
flags: list[str] | None = None,
) -> None: # pragma: no cover
if _use_uv(no_uv):
pip_command = ["uv", "pip", "install", "--python", python_executable]
pip_command = [
*conda_run,
"uv",
"pip",
"install",
"--python",
python_executable,
]
else:
pip_command = [*conda_run, python_executable, "-m", "pip", "install"]

Expand Down Expand Up @@ -975,8 +982,10 @@ def _install_command( # noqa: PLR0912, PLR0915
conda_env_prefix,
)
if env_spec.pip and not skip_pip:
conda_run = _maybe_conda_run(conda_executable, conda_env_name, conda_env_prefix)
if _use_uv(no_uv):
pip_command = [
*conda_run,
"uv",
"pip",
"install",
Expand All @@ -985,11 +994,6 @@ def _install_command( # noqa: PLR0912, PLR0915
*env_spec.pip,
]
else:
conda_run = _maybe_conda_run(
conda_executable,
conda_env_name,
conda_env_prefix,
)
pip_command = [
*conda_run,
python_executable,
Expand Down

0 comments on commit 075893b

Please sign in to comment.