mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-03-29 12:53:34 +08:00
* feat: add pygit2 compatibility wrapper for standalone Desktop 2.0 installs Add git_compat.py abstraction layer that wraps both GitPython and pygit2 behind a unified GitRepo interface. When CM_USE_PYGIT2=1 is set (by the Desktop 2.0 Launcher for standalone installs), or when system git is not available, the pygit2 backend is used automatically. Key changes: - New comfyui_manager/common/git_compat.py with abstract GitRepo base class, _GitPythonRepo (1:1 pass-throughs) and _Pygit2Repo implementations - All 6 non-legacy files updated to use the wrapper: - comfyui_manager/glob/manager_core.py (14 git.Repo usages) - comfyui_manager/common/git_helper.py (7 git.Repo usages) - comfyui_manager/common/context.py (1 usage) - comfyui_manager/glob/utils/environment_utils.py (2 usages) - cm_cli/__main__.py (1 usage) - comfyui_manager/common/timestamp_utils.py (repo.heads usage) - get_script_env() propagates CM_USE_PYGIT2 to subprocesses - git_helper.py uses sys.path.insert to find git_compat as standalone script - All repo handles wrapped in context managers to prevent resource leaks - get_head_by_name returns _HeadProxy for interface consistency - Submodule fallback logs clear message when system git is absent - 47 tests comparing both backends via subprocess isolation Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019d0ec5-cb9f-74df-a1a2-0c8154a330b3 * fix(pygit2): address review findings + bump version to 4.2b1 - C1: add submodule_update() after pygit2 clone for recursive parity - C2: check subprocess returncode in submodule_update fallback - C3: move GIT_OPT_SET_OWNER_VALIDATION to module-level (once at import) - H1: use context manager in git_pull() to prevent resource leaks - Bump version to 4.2b1, version_code to [4, 2] - Add pygit2 to dev dependencies and requirements.txt * style: fix ruff F841 unused variable and F541 unnecessary f-string --------- Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: Dr.Lt.Data <dr.lt.data@gmail.com>
66 lines
1.5 KiB
TOML
66 lines
1.5 KiB
TOML
[build-system]
|
|
requires = ["setuptools >= 61.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "comfyui-manager"
|
|
license = { text = "GPL-3.0-only" }
|
|
version = "4.2b1"
|
|
requires-python = ">= 3.9"
|
|
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
|
|
readme = "README.md"
|
|
keywords = ["comfyui", "comfyui-manager"]
|
|
|
|
maintainers = [
|
|
{ name = "Dr.Lt.Data", email = "dr.lt.data@gmail.com" },
|
|
{ name = "Yoland Yan", email = "yoland@comfy.org" },
|
|
{ name = "James Kwon", email = "hongilkwon316@gmail.com" },
|
|
{ name = "Robin Huang", email = "robin@comfy.org" },
|
|
]
|
|
|
|
classifiers = [
|
|
"Development Status :: 5 - Production/Stable",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
]
|
|
|
|
dependencies = [
|
|
"GitPython",
|
|
"PyGithub",
|
|
# "matrix-nio",
|
|
"transformers",
|
|
"huggingface-hub>0.20",
|
|
"typer",
|
|
"rich",
|
|
"typing-extensions",
|
|
"toml",
|
|
"uv",
|
|
"chardet"
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pre-commit", "pytest", "ruff", "pytest-cov", "pygit2"]
|
|
|
|
[project.urls]
|
|
Repository = "https://github.com/ltdrdata/ComfyUI-Manager"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["."]
|
|
include = ["comfyui_manager*", "cm_cli*"]
|
|
|
|
[project.scripts]
|
|
cm-cli = "cm_cli:main"
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
target-version = "py39"
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E4", # default
|
|
"E7", # default
|
|
"E9", # default
|
|
"F", # default
|
|
"I", # isort-like behavior (import statement sorting)
|
|
]
|