From 95b2db3c7cb778ca8a5d72a8c4ee0bbacf04ce0f Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Thu, 23 Jul 2026 23:48:24 -0700 Subject: [PATCH] refactor(uv): delete dead 'dists' packaging path (BE-4351) Remove DependencyCompiler.Download, fetch_dep_dists, install_dists, install_wheels, and sync_core_plus_ext. All five had zero call sites anywhere in comfy_cli/ or tests/ (verified by word-boundary grep). The live standalone-install path is wheels-only: standalone.py -> fetch_dep_wheels (Wheel) -> install_wheels_directly, all of which are kept untouched. Download duplicated Wheel modulo the pip subcommand (download vs wheel) and output flag (-d vs -w); its sole caller was fetch_dep_dists, so the duplication disappears with the dead half. Git history preserves the sdist path if a future offline-install feature ever needs it. --- comfy_cli/uv.py | 79 ------------------------------------------------- 1 file changed, 79 deletions(-) diff --git a/comfy_cli/uv.py b/comfy_cli/uv.py index cb495a5b..a1a8dcb1 100644 --- a/comfy_cli/uv.py +++ b/comfy_cli/uv.py @@ -324,42 +324,6 @@ def Sync( return _check_call(cmd, cwd) - @staticmethod - def Download( - cwd: PathLike, - executable: PathLike = sys.executable, - extraUrl: str | None = None, - noDeps: bool = False, - out: PathLike | None = None, - reqs: list[str] | None = None, - reqFile: list[PathLike] | None = None, - ) -> None: - """For now, the `download` cmd has no uv support, so use pip""" - cmd = [ - str(executable), - "-m", - "pip", - "download", - ] - - if extraUrl is not None: - cmd.extend(["--extra-index-url", extraUrl]) - - if noDeps: - cmd.append("--no-deps") - - if out is not None: - cmd.extend(["-d", str(out)]) - - if reqs is not None: - cmd.extend(reqs) - - if reqFile is not None: - for rf in reqFile: - cmd.extend(["--requirement", rf]) - - return _check_call(cmd, cwd) - @staticmethod def Wheel( cwd: PathLike, @@ -577,26 +541,6 @@ def install_deps(self): reqFile=[self.out], ) - def install_dists(self): - DependencyCompiler.Install( - cwd=self.cwd, - executable=self.executable, - find_links=[self.outDir / "dists"], - no_deps=True, - no_index=True, - reqFile=[self.out], - ) - - def install_wheels(self): - DependencyCompiler.Install( - cwd=self.cwd, - executable=self.executable, - find_links=[self.outDir / "wheels"], - no_deps=True, - no_index=True, - reqFile=[self.out], - ) - def install_wheels_directly(self): DependencyCompiler.Install( cwd=self.cwd, @@ -606,29 +550,6 @@ def install_wheels_directly(self): reqs=(self.outDir / "wheels").glob("*.whl"), ) - def sync_core_plus_ext(self): - DependencyCompiler.Sync( - cwd=self.cwd, - reqFile=[self.out], - executable=self.executable, - extraUrl=self.gpuUrl, - ) - - def fetch_dep_dists(self, skip_uv: bool = False): - skips = ["uv"] if skip_uv else None - reqs = parse_req_file(self.out, skips=skips) - - extraUrl = None if "--extra-index-url" in reqs else self.gpuUrl - - DependencyCompiler.Download( - cwd=self.cwd, - executable=self.executable, - extraUrl=extraUrl, - noDeps=True, - out=self.outDir / "dists", - reqs=reqs, - ) - def fetch_dep_wheels(self, skip_uv: bool = False): skips = ["uv"] if skip_uv else None reqs = parse_req_file(self.out, skips=skips)