comfy-env 0.0.23__py3-none-any.whl → 0.0.24__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/pixi.py CHANGED
@@ -274,6 +274,35 @@ def create_pixi_toml(
274
274
  return pixi_toml_path
275
275
 
276
276
 
277
+ def clean_pixi_artifacts(
278
+ node_dir: Path,
279
+ log: Callable[[str], None] = print,
280
+ ) -> None:
281
+ """
282
+ Remove previous pixi installation artifacts.
283
+
284
+ This ensures a clean state before generating a new pixi.toml,
285
+ preventing stale lock files or cached environments from causing conflicts.
286
+
287
+ Args:
288
+ node_dir: Directory containing the pixi artifacts.
289
+ log: Logging callback.
290
+ """
291
+ pixi_toml = node_dir / "pixi.toml"
292
+ pixi_lock = node_dir / "pixi.lock"
293
+ pixi_dir = node_dir / ".pixi"
294
+
295
+ if pixi_toml.exists():
296
+ pixi_toml.unlink()
297
+ log(" Removed previous pixi.toml")
298
+ if pixi_lock.exists():
299
+ pixi_lock.unlink()
300
+ log(" Removed previous pixi.lock")
301
+ if pixi_dir.exists():
302
+ shutil.rmtree(pixi_dir)
303
+ log(" Removed previous .pixi/ directory")
304
+
305
+
277
306
  def pixi_install(
278
307
  env_config: IsolatedEnv,
279
308
  node_dir: Path,
@@ -284,9 +313,10 @@ def pixi_install(
284
313
  Install conda and pip packages using pixi.
285
314
 
286
315
  This is the main entry point for pixi-based installation. It:
287
- 1. Ensures pixi is installed
288
- 2. Generates pixi.toml from the config
289
- 3. Runs `pixi install` to install all dependencies
316
+ 1. Cleans previous pixi artifacts
317
+ 2. Ensures pixi is installed
318
+ 3. Generates pixi.toml from the config
319
+ 4. Runs `pixi install` to install all dependencies
290
320
 
291
321
  Args:
292
322
  env_config: The isolated environment configuration.
@@ -304,6 +334,7 @@ def pixi_install(
304
334
 
305
335
  if dry_run:
306
336
  log("Dry run - would:")
337
+ log(f" - Clean previous pixi artifacts")
307
338
  log(f" - Ensure pixi is installed")
308
339
  log(f" - Generate pixi.toml in {node_dir}")
309
340
  if env_config.conda:
@@ -312,6 +343,9 @@ def pixi_install(
312
343
  log(f" - Install {len(env_config.requirements)} pip packages")
313
344
  return True
314
345
 
346
+ # Clean previous pixi artifacts
347
+ clean_pixi_artifacts(node_dir, log)
348
+
315
349
  # Ensure pixi is installed
316
350
  pixi_path = ensure_pixi(log=log)
317
351
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: comfy-env
3
- Version: 0.0.23
3
+ Version: 0.0.24
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
@@ -3,7 +3,7 @@ comfy_env/cli.py,sha256=X-GCQMP0mtMcE3ZgkT-VLQ4Gq3UUvcb_Ux_NClEFhgI,15975
3
3
  comfy_env/decorator.py,sha256=6JCKwLHaZtOLVDexs_gh_-NtS2ZK0V7nGCPqkyeYEAA,16688
4
4
  comfy_env/errors.py,sha256=8hN8NDlo8oBUdapc-eT3ZluigI5VBzfqsSBvQdfWlz4,9943
5
5
  comfy_env/install.py,sha256=CA5O0-ghkTdV67fVyKJy6wt1vL35inBeqWtA52udjHI,24301
6
- comfy_env/pixi.py,sha256=VqAv_sSdCBGIbLS5jLYnxV6rgiunsCUC5NtmpfV7rI4,12296
6
+ comfy_env/pixi.py,sha256=Oj9Z9bBg8IpsPF3usAx9v4w6OhpNk4LQjUuAP5ohnQY,13324
7
7
  comfy_env/registry.py,sha256=uFCtGmWYvwGCqObXgzmArX7o5JsFNsHXxayofk3m6no,2569
8
8
  comfy_env/resolver.py,sha256=l-AnmCE1puG6CvdpDB-KrsfG_cn_3uO2DryYizUnG_4,12474
9
9
  comfy_env/env/__init__.py,sha256=imQdoQEQvrRT-QDtyNpFlkVbm2fBzgACdpQwRPd09fI,1157
@@ -33,8 +33,8 @@ comfy_env/workers/tensor_utils.py,sha256=TCuOAjJymrSbkgfyvcKtQ_KbVWTqSwP9VH_bCaF
33
33
  comfy_env/workers/torch_mp.py,sha256=4YSNPn7hALrvMVbkO4RkTeFTcc0lhfLMk5QTWjY4PHw,22134
34
34
  comfy_env/workers/venv.py,sha256=_ekHfZPqBIPY08DjqiXm6cTBQH4DrbxRWR3AAv3mit8,31589
35
35
  comfy_env/wheel_sources.yml,sha256=nSZ8XB_I5JXQGB7AgC6lHs_IXMd9Kcno10artNL8BKw,7775
36
- comfy_env-0.0.23.dist-info/METADATA,sha256=oTiCkl-rEq5VD2B9BhRvcCRo9iZyFF5QWLjuYQI3tDI,5400
37
- comfy_env-0.0.23.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
38
- comfy_env-0.0.23.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
39
- comfy_env-0.0.23.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
40
- comfy_env-0.0.23.dist-info/RECORD,,
36
+ comfy_env-0.0.24.dist-info/METADATA,sha256=acYtmccSaZ0IrwiSKLZAekSHGur8G0vsmqYc0Uw0D-U,5400
37
+ comfy_env-0.0.24.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
38
+ comfy_env-0.0.24.dist-info/entry_points.txt,sha256=J4fXeqgxU_YenuW_Zxn_pEL7J-3R0--b6MS5t0QmAr0,49
39
+ comfy_env-0.0.24.dist-info/licenses/LICENSE,sha256=E68QZMMpW4P2YKstTZ3QU54HRQO8ecew09XZ4_Vn870,1093
40
+ comfy_env-0.0.24.dist-info/RECORD,,