comfy-env 0.0.8__py3-none-any.whl → 0.0.9__py3-none-any.whl

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.
comfy_env/env/config.py CHANGED
@@ -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
 
comfy_env/env/manager.py CHANGED
@@ -263,13 +263,29 @@ class IsolatedEnvManager:
263
263
  """
264
264
  python_exe = self.get_python(env)
265
265
 
266
- if not env.requirements and not env.requirements_file:
266
+ # Merge platform-specific requirements
267
+ if sys.platform == 'win32':
268
+ platform_reqs = env.windows_requirements
269
+ platform_name = 'Windows'
270
+ elif sys.platform == 'darwin':
271
+ platform_reqs = env.darwin_requirements
272
+ platform_name = 'macOS'
273
+ else:
274
+ platform_reqs = env.linux_requirements
275
+ platform_name = 'Linux'
276
+
277
+ all_requirements = list(env.requirements) + list(platform_reqs)
278
+
279
+ if platform_reqs:
280
+ self.log(f"Including {len(platform_reqs)} {platform_name}-specific packages")
281
+
282
+ if not all_requirements and not env.requirements_file:
267
283
  self.log("No requirements to install")
268
284
  return
269
285
 
270
286
  # Validate requirements for security
271
- if env.requirements:
272
- validate_dependencies(env.requirements)
287
+ if all_requirements:
288
+ validate_dependencies(all_requirements)
273
289
 
274
290
  # Validate wheel sources
275
291
  for wheel_source in env.wheel_sources:
@@ -311,11 +327,11 @@ class IsolatedEnvManager:
311
327
  self.log(f"Installing {len(env.no_deps_requirements)} CUDA packages")
312
328
  self._install_cuda_packages(env, pip_args)
313
329
 
314
- # Install individual requirements
315
- if env.requirements:
316
- self.log(f"Installing {len(env.requirements)} packages")
330
+ # Install individual requirements (including platform-specific)
331
+ if all_requirements:
332
+ self.log(f"Installing {len(all_requirements)} packages")
317
333
  result = subprocess.run(
318
- pip_args + env.requirements,
334
+ pip_args + all_requirements,
319
335
  capture_output=True,
320
336
  text=True,
321
337
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfy-env
3
- Version: 0.0.8
3
+ Version: 0.0.9
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
@@ -7,10 +7,10 @@ comfy_env/registry.py,sha256=iZprw2iIAJl-Vvotsf_B_PofzqE-6IiVfNPBHYUYg6g,11577
7
7
  comfy_env/resolver.py,sha256=xz7GPlxy02iwwpocIzzbdGnrwnSpi-D5IzpL8SQSgvI,12893
8
8
  comfy_env/runner.py,sha256=0YUqzK93u--7pKV6_yVC564AJE9rS3y81t5ZhQi2t4Y,9696
9
9
  comfy_env/env/__init__.py,sha256=sybOBrxJCfL4Xry9NNd5xwn9hXIHudXlXDa7SpJkPCE,811
10
- comfy_env/env/config.py,sha256=fL2P0ScoioPktZEHQnoo1dy-VB5intJEYLHm5fuOmF8,5406
11
- comfy_env/env/config_file.py,sha256=QLf3WPCqx46v1kVzM4jV_QAz919zmkk0_FRtLD3jO8s,19507
10
+ comfy_env/env/config.py,sha256=R8JyE5iQLHKgnxXOGA8SAI7iu2eYSfXn-MsaqHoU2_A,5667
11
+ comfy_env/env/config_file.py,sha256=2sTeBUqdDYPwQfUO-3Mu2zTsgxQ4IhllRxEd2a4pgPg,20593
12
12
  comfy_env/env/detection.py,sha256=Co8BJmTRCq1ZHDsm6832jF87za0GRAhH7zF04-5QwcE,4949
13
- comfy_env/env/manager.py,sha256=ysIVlpxRD5x-5X47ESmfly2Vz6jv-9yA6863szHf7-8,24131
13
+ comfy_env/env/manager.py,sha256=hGaK9C_nRwfHthowgFv2rPhhpfAMDJhxPEdQFFv6BbI,24770
14
14
  comfy_env/env/security.py,sha256=dNSitAnfBNVdvxgBBntYw33AJaCs_S1MHb7KJhAVYzM,8171
15
15
  comfy_env/env/platform/__init__.py,sha256=Nb5MPZIEeanSMEWwqU4p4bnEKTJn1tWcwobnhq9x9IY,614
16
16
  comfy_env/env/platform/base.py,sha256=iS0ptTTVjXRwPU4qWUdvHI7jteuzxGSjWr5BUQ7hGiU,2453
@@ -32,8 +32,8 @@ comfy_env/workers/pool.py,sha256=MtjeOWfvHSCockq8j1gfnxIl-t01GSB79T5N4YB82Lg,695
32
32
  comfy_env/workers/tensor_utils.py,sha256=TCuOAjJymrSbkgfyvcKtQ_KbVWTqSwP9VH_bCaFLLq8,6409
33
33
  comfy_env/workers/torch_mp.py,sha256=DsfxE3LBAWEuGtk-p-YL0UhVQ7VDh73KT_TFRxYN4-Q,12563
34
34
  comfy_env/workers/venv.py,sha256=_ekHfZPqBIPY08DjqiXm6cTBQH4DrbxRWR3AAv3mit8,31589
35
- comfy_env-0.0.8.dist-info/METADATA,sha256=mir9pZymbCPcnI6yc1YrjxyMMnX3qm3pUR7NILB5iCE,5371
36
- comfy_env-0.0.8.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
37
- comfy_env-0.0.8.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
38
- comfy_env-0.0.8.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
39
- comfy_env-0.0.8.dist-info/RECORD,,
35
+ comfy_env-0.0.9.dist-info/METADATA,sha256=HwKjPaZyiGGsJ47w8nempK8MokAu1YbWS1ZqwSCXS_4,5371
36
+ comfy_env-0.0.9.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
37
+ comfy_env-0.0.9.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
38
+ comfy_env-0.0.9.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
39
+ comfy_env-0.0.9.dist-info/RECORD,,