Skip to content

Commit 89c4c13

Browse files
committed
fix endless recursion
1 parent 78c85f4 commit 89c4c13

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

platform.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,14 @@ def setup_python_env(self, env):
741741
# This should not happen, but provide fallback
742742
logger.warning("Penv not set up in configure_default_packages, setting up now")
743743

744-
# Use the centralized setup method
745-
return self.setup_python_env(env)
744+
# Use centralized minimal setup as a fallback and propagate into SCons
745+
config = ProjectConfig.get_instance()
746+
core_dir = config.get("platformio", "core_dir")
747+
penv_python, esptool_path = setup_penv_minimal(self, core_dir, install_esptool=True)
748+
self._penv_python = penv_python
749+
self._esptool_path = esptool_path
750+
env.Replace(PYTHONEXE=penv_python)
751+
return penv_python, esptool_path
746752

747753
def configure_default_packages(self, variables: Dict, targets: List[str]) -> Any:
748754
"""Main configuration method with optimized package management."""

0 commit comments

Comments
 (0)