Skip to content

Commit

Permalink
fix: make local install work again
Browse files Browse the repository at this point in the history
  • Loading branch information
robinvandernoord committed Mar 11, 2024
1 parent ce55dd0 commit 945edf7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies = [
"uv",
"typer",
"plumbum",
"threadful>=0.2",
"threadful>=0.3",
"rich",
"msgspec",
"packaging",
Expand Down
6 changes: 3 additions & 3 deletions src/uvx/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ def _list_normal(name: str, metadata: Maybe[Metadata], verbose: bool = False):

extras = list(md.extras)
name_with_extras = name if not extras else f"{name}{extras}"
print("-", name_with_extras)
rich.print("-", name_with_extras)

md.check_script_symlinks(name)

if verbose:
rich.print(TAB, metadata)
rich.print(TAB, str(md))
else:
rich.print(
TAB,
Expand All @@ -110,7 +110,7 @@ def _list_venvs_json():
name: metadata.map_or({}, lambda md: md.check_script_symlinks(name).to_dict())
for name, metadata in list_packages()
},
indent=2
indent=2,
)
)

Expand Down
2 changes: 2 additions & 0 deletions src/uvx/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ def install_package(
if venv is None:
venv = create_venv(meta.name, python=python, force=force)

# todo: make --force use --no-cache

with virtualenv(venv), exit_on_pb_error():
try:
animate(uv("pip", "install", meta.install_spec), text=f"installing {meta.name}")
Expand Down
2 changes: 1 addition & 1 deletion src/uvx/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def resolve_local(spec: str) -> tuple[Maybe[str], Maybe[str]]:
_extras = ",".join(extras)
return Ok(f"{name}[{_extras}]"), Ok(file_url)
else:
return name, file_url
return Ok(name), Ok(file_url)
except Exception:
return Empty(), Empty()

Expand Down

0 comments on commit 945edf7

Please sign in to comment.