Skip to content

Commit

Permalink
Fix calling pip wheel when requirements is a list of paths. (#165)
Browse files Browse the repository at this point in the history
* Fix requirements.txt path.

* Remove print.

* Revert change to change default directory of requirements.compiled
  • Loading branch information
robinjhuang authored Aug 27, 2024
1 parent 743f8bc commit 2ce5e92
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions comfy_cli/uv.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,14 @@ def Download(
"-m",
"pip",
"download",
"-r",
str(reqFile),
]

if isinstance(reqFile, (str, Path)):
cmd.extend(["-r", str(reqFile)])
elif isinstance(reqFile, list):
for rf in reqFile:
cmd.extend(["-r", str(rf)])

if extraUrl is not None:
cmd.extend(["--extra-index-url", extraUrl])

Expand All @@ -271,14 +275,13 @@ def Wheel(
out: Optional[PathLike] = None,
) -> subprocess.CompletedProcess[Any]:
"""For now, the `wheel` cmd has no uv support, so use pip"""
cmd = [
str(executable),
"-m",
"pip",
"wheel",
"-r",
str(reqFile),
]
cmd = [str(executable), "-m", "pip", "wheel"]

if isinstance(reqFile, (str, Path)):
cmd.extend(["-r", str(reqFile)])
elif isinstance(reqFile, list):
for rf in reqFile:
cmd.extend(["-r", str(rf)])

if extraUrl is not None:
cmd.extend(["--extra-index-url", extraUrl])
Expand Down

0 comments on commit 2ce5e92

Please sign in to comment.