comfy-env 0.0.68__tar.gz → 0.0.70__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {comfy_env-0.0.68 → comfy_env-0.0.70}/PKG-INFO +1 -1
  2. {comfy_env-0.0.68 → comfy_env-0.0.70}/pyproject.toml +1 -1
  3. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/config/parser.py +6 -1
  4. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/config/types.py +3 -0
  5. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/install.py +1 -1
  6. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/pixi/core.py +15 -24
  7. {comfy_env-0.0.68 → comfy_env-0.0.70}/.github/workflows/publish.yml +0 -0
  8. {comfy_env-0.0.68 → comfy_env-0.0.70}/.gitignore +0 -0
  9. {comfy_env-0.0.68 → comfy_env-0.0.70}/LICENSE +0 -0
  10. {comfy_env-0.0.68 → comfy_env-0.0.70}/README.md +0 -0
  11. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/__init__.py +0 -0
  12. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/cli.py +0 -0
  13. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/config/__init__.py +0 -0
  14. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/errors.py +0 -0
  15. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/isolation/__init__.py +0 -0
  16. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/isolation/wrap.py +0 -0
  17. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/nodes.py +0 -0
  18. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/pixi/__init__.py +0 -0
  19. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/pixi/cuda_detection.py +0 -0
  20. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/pixi/platform/__init__.py +0 -0
  21. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/pixi/platform/base.py +0 -0
  22. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/pixi/platform/darwin.py +0 -0
  23. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/pixi/platform/linux.py +0 -0
  24. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/pixi/platform/windows.py +0 -0
  25. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/pixi/resolver.py +0 -0
  26. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/prestartup.py +0 -0
  27. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/templates/comfy-env-instructions.txt +0 -0
  28. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/templates/comfy-env.toml +0 -0
  29. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/workers/__init__.py +0 -0
  30. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/workers/base.py +0 -0
  31. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/workers/mp.py +0 -0
  32. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/workers/subprocess.py +0 -0
  33. {comfy_env-0.0.68 → comfy_env-0.0.70}/src/comfy_env/workers/tensor_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfy-env
3
- Version: 0.0.68
3
+ Version: 0.0.70
4
4
  Summary: Environment management for ComfyUI custom nodes - CUDA wheel resolution and process isolation
5
5
  Project-URL: Homepage, https://github.com/PozzettiAndrea/comfy-env
6
6
  Project-URL: Repository, https://github.com/PozzettiAndrea/comfy-env
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "comfy-env"
3
- version = "0.0.68"
3
+ version = "0.0.70"
4
4
  description = "Environment management for ComfyUI custom nodes - CUDA wheel resolution and process isolation"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}
@@ -49,7 +49,7 @@ from .types import ComfyEnvConfig, NodeReq
49
49
  CONFIG_FILE_NAME = "comfy-env.toml"
50
50
 
51
51
  # Sections we handle specially (not passed through to pixi.toml)
52
- CUSTOM_SECTIONS = {"python", "cuda", "node_reqs"}
52
+ CUSTOM_SECTIONS = {"python", "cuda", "node_reqs", "apt"}
53
53
 
54
54
 
55
55
  def load_config(path: Path) -> ComfyEnvConfig:
@@ -116,6 +116,10 @@ def _parse_config(data: Dict[str, Any]) -> ComfyEnvConfig:
116
116
  cuda_data = data.pop("cuda", {})
117
117
  cuda_packages = _ensure_list(cuda_data.get("packages", []))
118
118
 
119
+ # Extract [apt] section
120
+ apt_data = data.pop("apt", {})
121
+ apt_packages = _ensure_list(apt_data.get("packages", []))
122
+
119
123
  # Extract [node_reqs] section
120
124
  node_reqs_data = data.pop("node_reqs", {})
121
125
  node_reqs = _parse_node_reqs(node_reqs_data)
@@ -126,6 +130,7 @@ def _parse_config(data: Dict[str, Any]) -> ComfyEnvConfig:
126
130
  return ComfyEnvConfig(
127
131
  python=python_version,
128
132
  cuda_packages=cuda_packages,
133
+ apt_packages=apt_packages,
129
134
  node_reqs=node_reqs,
130
135
  pixi_passthrough=pixi_passthrough,
131
136
  )
@@ -53,6 +53,9 @@ class ComfyEnvConfig:
53
53
  # [cuda] - CUDA packages (installed via find-links index)
54
54
  cuda_packages: List[str] = field(default_factory=list)
55
55
 
56
+ # [apt] - System packages to install via apt (Linux only)
57
+ apt_packages: List[str] = field(default_factory=list)
58
+
56
59
  # [node_reqs] - other ComfyUI nodes to clone
57
60
  node_reqs: List[NodeReq] = field(default_factory=list)
58
61
 
@@ -151,7 +151,7 @@ def _install_isolated_subdirs(
151
151
  log(f" (dry run)")
152
152
  continue
153
153
 
154
- pixi_install(sub_cfg, sub_dir, log, create_env_link=True)
154
+ pixi_install(sub_cfg, sub_dir, log)
155
155
 
156
156
 
157
157
  def verify_installation(
@@ -172,7 +172,6 @@ def pixi_install(
172
172
  cfg: ComfyEnvConfig,
173
173
  node_dir: Path,
174
174
  log: Callable[[str], None] = print,
175
- create_env_link: bool = False,
176
175
  ) -> bool:
177
176
  """
178
177
  Install all packages via pixi.
@@ -188,7 +187,6 @@ def pixi_install(
188
187
  cfg: ComfyEnvConfig with packages to install.
189
188
  node_dir: Directory to install in.
190
189
  log: Logging callback.
191
- create_env_link: If True, create _env_<name> symlink for isolation.
192
190
 
193
191
  Returns:
194
192
  True if installation succeeded.
@@ -217,9 +215,24 @@ def pixi_install(
217
215
  else:
218
216
  log("Warning: CUDA packages requested but no GPU detected")
219
217
 
218
+ # Install system dependencies on Linux via apt
219
+ if sys.platform == "linux" and cfg.apt_packages:
220
+ log(f"Installing apt packages: {cfg.apt_packages}")
221
+ subprocess.run(["sudo", "apt-get", "update"], capture_output=True)
222
+ subprocess.run(
223
+ ["sudo", "apt-get", "install", "-y"] + cfg.apt_packages,
224
+ capture_output=True,
225
+ )
226
+
220
227
  # Clean previous artifacts
221
228
  clean_pixi_artifacts(node_dir, log)
222
229
 
230
+ # Create .pixi/config.toml to ensure inline (non-detached) environments
231
+ pixi_config_dir = node_dir / ".pixi"
232
+ pixi_config_dir.mkdir(parents=True, exist_ok=True)
233
+ pixi_config_file = pixi_config_dir / "config.toml"
234
+ pixi_config_file.write_text("detached-environments = false\n")
235
+
223
236
  # Ensure pixi is installed
224
237
  pixi_path = ensure_pixi(log=log)
225
238
 
@@ -324,27 +337,5 @@ def pixi_install(
324
337
 
325
338
  log("CUDA packages installed")
326
339
 
327
- # Create symlink/junction to _env_<name> for discovery (only for isolated subdirs)
328
- if create_env_link:
329
- env_dir = node_dir / ".pixi" / "envs" / "default"
330
- env_link = node_dir / f"_env_{node_dir.name}"
331
- if env_dir.exists():
332
- # Remove existing link/dir if present
333
- if env_link.is_symlink() or env_link.exists():
334
- if env_link.is_symlink():
335
- env_link.unlink()
336
- else:
337
- shutil.rmtree(env_link)
338
- # Create symlink (Linux/Mac) or junction (Windows)
339
- if sys.platform == "win32":
340
- # Use junction on Windows
341
- subprocess.run(
342
- ["cmd", "/c", "mklink", "/J", str(env_link), str(env_dir)],
343
- capture_output=True,
344
- )
345
- else:
346
- env_link.symlink_to(env_dir)
347
- log(f"Linked: {env_link.name} -> .pixi/envs/default")
348
-
349
340
  log("Installation complete!")
350
341
  return True
File without changes
File without changes
File without changes