Skip to content

Commit

Permalink
Fix requirements.txt path.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed Aug 27, 2024
1 parent 743f8bc commit 661e277
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 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 All @@ -288,7 +291,7 @@ def Wheel(

if out is not None:
cmd.extend(["-w", str(out)])

print(cmd)
return _check_call(cmd, cwd)

@staticmethod
Expand Down Expand Up @@ -343,8 +346,8 @@ def __init__(
DependencyCompiler.rocmPytorchUrl if self.gpu == GPU_OPTION.AMD else
None
) # fmt: skip
self.out: Path = self.outDir / outName
self.override = self.outDir / "override.txt"
self.out: Path = self.cwd / outName
self.override = self.cwd / "override.txt"

self.reqFilesCore = reqFilesCore if reqFilesCore is not None else self.find_core_reqs()
self.reqFilesExt = reqFilesExt if reqFilesExt is not None else self.find_ext_reqs()
Expand Down

0 comments on commit 661e277

Please sign in to comment.