Skip to content

Commit 0cb961e

Browse files
authored
Use constant for downloading python standalone version. (#177)
* Create constant for downloading python standalone version. * Ruff fix.
1 parent b6ac43a commit 0cb961e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

comfy_cli/constants.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,6 @@ class GPU_OPTION(str, Enum):
7777
SUPPORTED_PT_EXTENSIONS = (".ckpt", ".pt", ".bin", ".pth", ".safetensors")
7878

7979
NODE_ZIP_FILENAME = "node.zip"
80+
81+
# The default version to download from python-build-standalone.
82+
DEFAULT_STANDALONE_PYTHON_DOWNLOAD_VERSION = "3.12.6"

comfy_cli/standalone.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import requests
77

8-
from comfy_cli.constants import OS, PROC
8+
from comfy_cli.constants import DEFAULT_STANDALONE_PYTHON_DOWNLOAD_VERSION, OS, PROC
99
from comfy_cli.typing import PathLike
1010
from comfy_cli.utils import create_tarball, download_url, extract_tarball, get_os, get_proc
1111
from comfy_cli.uv import DependencyCompiler
@@ -28,7 +28,7 @@
2828
def download_standalone_python(
2929
platform: Optional[str] = None,
3030
proc: Optional[str] = None,
31-
version: str = "3.12.5",
31+
version: str = DEFAULT_STANDALONE_PYTHON_DOWNLOAD_VERSION,
3232
tag: str = "latest",
3333
flavor: str = "install_only",
3434
cwd: PathLike = ".",
@@ -65,7 +65,7 @@ class StandalonePython:
6565
def FromDistro(
6666
platform: Optional[str] = None,
6767
proc: Optional[str] = None,
68-
version: str = "3.12.6",
68+
version: str = DEFAULT_STANDALONE_PYTHON_DOWNLOAD_VERSION,
6969
tag: str = "latest",
7070
flavor: str = "install_only",
7171
cwd: PathLike = ".",

0 commit comments

Comments
 (0)