@@ -173,9 +173,20 @@ def exclude_satisfied_requirements(
173173 """
174174 from packaging .requirements import Requirement
175175
176- result = subprocess .run ( # noqa: S603 # Trusted: system pip executable
177- [str (python_exe ), "-m" , "pip" , "list" , "--format" , "json" ], capture_output = True , text = True , check = True
178- )
176+ try :
177+ result = subprocess .run ( # noqa: S603 # Trusted: system pip executable
178+ [str (python_exe ), "-m" , "pip" , "list" , "--format" , "json" ],
179+ capture_output = True ,
180+ text = True ,
181+ check = True ,
182+ )
183+ except subprocess .CalledProcessError as exc :
184+ # Newer uv versions can create venvs without pip unless seeded.
185+ # If pip is unavailable, skip filtering and install requested deps.
186+ if "No module named pip" in (exc .stderr or "" ):
187+ logger .debug ("pip unavailable in %s; skipping satisfied-requirement filter" , python_exe )
188+ return requirements
189+ raise
179190 installed = {pkg ["name" ].lower (): pkg ["version" ] for pkg in json .loads (result .stdout )}
180191 torch_ecosystem = get_torch_ecosystem_packages ()
181192
@@ -227,6 +238,7 @@ def create_venv(venv_path: Path, config: ExtensionConfig) -> None:
227238 uv_path ,
228239 "venv" ,
229240 str (venv_path ),
241+ "--seed" ,
230242 "--python" ,
231243 sys .executable ,
232244 ]
@@ -337,7 +349,34 @@ def install_dependencies(venv_path: Path, config: ExtensionConfig, name: str) ->
337349 except Exception as exc :
338350 logger .debug ("Dependency cache read failed: %s" , exc )
339351
340- cmd = cmd_prefix + safe_deps + common_args
352+ install_targets : list [str ] = []
353+ i = 0
354+ while i < len (safe_deps ):
355+ dep = safe_deps [i ]
356+ dep_stripped = dep .strip ()
357+
358+ # Support split editable args from existing callers:
359+ # ["-e", "/path/to/pkg"].
360+ if dep_stripped == "-e" :
361+ if i + 1 >= len (safe_deps ):
362+ raise ValueError ("Editable dependency '-e' must include a path or URL" )
363+ editable_target = safe_deps [i + 1 ].strip ()
364+ if not editable_target :
365+ raise ValueError ("Editable dependency '-e' must include a path or URL" )
366+ install_targets .extend (["-e" , editable_target ])
367+ i += 2
368+ continue
369+
370+ if dep_stripped .startswith ("-e " ):
371+ editable_target = dep_stripped [3 :].strip ()
372+ if not editable_target :
373+ raise ValueError ("Editable dependency must include a path or URL after '-e'" )
374+ install_targets .extend (["-e" , editable_target ])
375+ else :
376+ install_targets .append (dep )
377+ i += 1
378+
379+ cmd = cmd_prefix + install_targets + common_args
341380
342381 with subprocess .Popen ( # noqa: S603 # Trusted: validated pip/uv install cmd
343382 cmd ,
0 commit comments