comfy-env 0.0.8__tar.gz → 0.0.10__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 (48) hide show
  1. {comfy_env-0.0.8 → comfy_env-0.0.10}/PKG-INFO +1 -1
  2. {comfy_env-0.0.8 → comfy_env-0.0.10}/pyproject.toml +1 -1
  3. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/env/config.py +4 -0
  4. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/env/config_file.py +27 -0
  5. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/env/manager.py +24 -7
  6. {comfy_env-0.0.8 → comfy_env-0.0.10}/.github/workflows/publish.yml +0 -0
  7. {comfy_env-0.0.8 → comfy_env-0.0.10}/.gitignore +0 -0
  8. {comfy_env-0.0.8 → comfy_env-0.0.10}/CLAUDE.md +0 -0
  9. {comfy_env-0.0.8 → comfy_env-0.0.10}/CRITICISM.md +0 -0
  10. {comfy_env-0.0.8 → comfy_env-0.0.10}/LICENSE +0 -0
  11. {comfy_env-0.0.8 → comfy_env-0.0.10}/README.md +0 -0
  12. {comfy_env-0.0.8 → comfy_env-0.0.10}/examples/basic_node/__init__.py +0 -0
  13. {comfy_env-0.0.8 → comfy_env-0.0.10}/examples/basic_node/comfy-env.toml +0 -0
  14. {comfy_env-0.0.8 → comfy_env-0.0.10}/examples/basic_node/nodes.py +0 -0
  15. {comfy_env-0.0.8 → comfy_env-0.0.10}/examples/basic_node/worker.py +0 -0
  16. {comfy_env-0.0.8 → comfy_env-0.0.10}/examples/decorator_node/__init__.py +0 -0
  17. {comfy_env-0.0.8 → comfy_env-0.0.10}/examples/decorator_node/nodes.py +0 -0
  18. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/__init__.py +0 -0
  19. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/cli.py +0 -0
  20. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/decorator.py +0 -0
  21. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/env/__init__.py +0 -0
  22. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/env/detection.py +0 -0
  23. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/env/platform/__init__.py +0 -0
  24. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/env/platform/base.py +0 -0
  25. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/env/platform/darwin.py +0 -0
  26. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/env/platform/linux.py +0 -0
  27. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/env/platform/windows.py +0 -0
  28. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/env/security.py +0 -0
  29. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/errors.py +0 -0
  30. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/install.py +0 -0
  31. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/ipc/__init__.py +0 -0
  32. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/ipc/bridge.py +0 -0
  33. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/ipc/protocol.py +0 -0
  34. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/ipc/tensor.py +0 -0
  35. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/ipc/torch_bridge.py +0 -0
  36. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/ipc/transport.py +0 -0
  37. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/ipc/worker.py +0 -0
  38. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/registry.py +0 -0
  39. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/resolver.py +0 -0
  40. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/runner.py +0 -0
  41. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/stubs/__init__.py +0 -0
  42. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/stubs/folder_paths.py +0 -0
  43. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/workers/__init__.py +0 -0
  44. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/workers/base.py +0 -0
  45. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/workers/pool.py +0 -0
  46. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/workers/tensor_utils.py +0 -0
  47. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/workers/torch_mp.py +0 -0
  48. {comfy_env-0.0.8 → comfy_env-0.0.10}/src/comfy_env/workers/venv.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfy-env
3
- Version: 0.0.8
3
+ Version: 0.0.10
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.8"
3
+ version = "0.0.10"
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"}
@@ -98,6 +98,10 @@ class IsolatedEnv:
98
98
  cuda: Optional[str] = None
99
99
  requirements: list[str] = field(default_factory=list)
100
100
  no_deps_requirements: list[str] = field(default_factory=list) # Install with --no-deps
101
+ # Platform-specific requirements (merged at install time)
102
+ windows_requirements: list[str] = field(default_factory=list)
103
+ linux_requirements: list[str] = field(default_factory=list)
104
+ darwin_requirements: list[str] = field(default_factory=list)
101
105
  requirements_file: Optional[Path] = None
102
106
  wheel_sources: list[str] = field(default_factory=list)
103
107
  index_urls: list[str] = field(default_factory=list)
@@ -529,6 +529,30 @@ def _parse_single_env(name: str, env_data: Dict[str, Any], base_dir: Path) -> Is
529
529
  elif isinstance(packages_section, list):
530
530
  requirements = packages_section
531
531
 
532
+ # Parse platform-specific packages [envname.packages.windows], etc.
533
+ windows_reqs = []
534
+ linux_reqs = []
535
+ darwin_reqs = []
536
+
537
+ if isinstance(packages_section, dict):
538
+ win_section = packages_section.get("windows", {})
539
+ if isinstance(win_section, dict):
540
+ windows_reqs = win_section.get("requirements", [])
541
+ elif isinstance(win_section, list):
542
+ windows_reqs = win_section
543
+
544
+ linux_section = packages_section.get("linux", {})
545
+ if isinstance(linux_section, dict):
546
+ linux_reqs = linux_section.get("requirements", [])
547
+ elif isinstance(linux_section, list):
548
+ linux_reqs = linux_section
549
+
550
+ darwin_section = packages_section.get("darwin", {})
551
+ if isinstance(darwin_section, dict):
552
+ darwin_reqs = darwin_section.get("requirements", [])
553
+ elif isinstance(darwin_section, list):
554
+ darwin_reqs = darwin_section
555
+
532
556
  return IsolatedEnv(
533
557
  name=name,
534
558
  python=python,
@@ -536,6 +560,9 @@ def _parse_single_env(name: str, env_data: Dict[str, Any], base_dir: Path) -> Is
536
560
  pytorch_version=pytorch,
537
561
  requirements=requirements,
538
562
  no_deps_requirements=no_deps_requirements,
563
+ windows_requirements=windows_reqs,
564
+ linux_requirements=linux_reqs,
565
+ darwin_requirements=darwin_reqs,
539
566
  )
540
567
 
541
568
 
@@ -6,6 +6,7 @@ Uses uv for fast environment creation and package installation.
6
6
 
7
7
  import subprocess
8
8
  import shutil
9
+ import sys
9
10
  from pathlib import Path
10
11
  from typing import Optional, Callable
11
12
 
@@ -263,13 +264,29 @@ class IsolatedEnvManager:
263
264
  """
264
265
  python_exe = self.get_python(env)
265
266
 
266
- if not env.requirements and not env.requirements_file:
267
+ # Merge platform-specific requirements
268
+ if sys.platform == 'win32':
269
+ platform_reqs = env.windows_requirements
270
+ platform_name = 'Windows'
271
+ elif sys.platform == 'darwin':
272
+ platform_reqs = env.darwin_requirements
273
+ platform_name = 'macOS'
274
+ else:
275
+ platform_reqs = env.linux_requirements
276
+ platform_name = 'Linux'
277
+
278
+ all_requirements = list(env.requirements) + list(platform_reqs)
279
+
280
+ if platform_reqs:
281
+ self.log(f"Including {len(platform_reqs)} {platform_name}-specific packages")
282
+
283
+ if not all_requirements and not env.requirements_file:
267
284
  self.log("No requirements to install")
268
285
  return
269
286
 
270
287
  # Validate requirements for security
271
- if env.requirements:
272
- validate_dependencies(env.requirements)
288
+ if all_requirements:
289
+ validate_dependencies(all_requirements)
273
290
 
274
291
  # Validate wheel sources
275
292
  for wheel_source in env.wheel_sources:
@@ -311,11 +328,11 @@ class IsolatedEnvManager:
311
328
  self.log(f"Installing {len(env.no_deps_requirements)} CUDA packages")
312
329
  self._install_cuda_packages(env, pip_args)
313
330
 
314
- # Install individual requirements
315
- if env.requirements:
316
- self.log(f"Installing {len(env.requirements)} packages")
331
+ # Install individual requirements (including platform-specific)
332
+ if all_requirements:
333
+ self.log(f"Installing {len(all_requirements)} packages")
317
334
  result = subprocess.run(
318
- pip_args + env.requirements,
335
+ pip_args + all_requirements,
319
336
  capture_output=True,
320
337
  text=True,
321
338
  )
File without changes
File without changes
File without changes
File without changes
File without changes