46
46
47
47
# Import penv_setup functionality
48
48
try :
49
- from .builder .penv_setup import setup_python_environment , setup_penv_minimal , get_executable_path
49
+ from .builder .penv_setup import setup_penv_simple , get_executable_path
50
50
except ImportError :
51
51
# Fallback for standalone execution
52
52
sys .path .insert (0 , str (Path (__file__ ).parent / "builder" ))
53
- from penv_setup import setup_python_environment , setup_penv_minimal , get_executable_path
53
+ from penv_setup import setup_penv_simple , get_executable_path
54
54
55
55
56
56
# Constants
@@ -740,14 +740,9 @@ def setup_python_env(self, env):
740
740
741
741
# This should not happen, but provide fallback
742
742
logger .warning ("Penv not set up in configure_default_packages, setting up now" )
743
- config = ProjectConfig .get_instance ()
744
- core_dir = config .get ("platformio" , "core_dir" )
745
743
746
- python_exe , esptool_binary_path = setup_python_environment (env , self , core_dir )
747
- self ._penv_python = python_exe
748
- self ._esptool_path = esptool_binary_path
749
-
750
- return python_exe , esptool_binary_path
744
+ # Use the centralized setup method
745
+ return self .setup_python_env (env )
751
746
752
747
def configure_default_packages (self , variables : Dict , targets : List [str ]) -> Any :
753
748
"""Main configuration method with optimized package management."""
@@ -768,8 +763,8 @@ def configure_default_packages(self, variables: Dict, targets: List[str]) -> Any
768
763
config = ProjectConfig .get_instance ()
769
764
core_dir = config .get ("platformio" , "core_dir" )
770
765
771
- # Setup penv using minimal function (no SCons dependencies, esptool from tl-install)
772
- penv_python , esptool_path = setup_penv_minimal (self , core_dir , install_esptool = True )
766
+ # Setup penv using simple function (no SCons dependencies, esptool from tl-install)
767
+ penv_python , esptool_path = setup_penv_simple (self , core_dir )
773
768
774
769
# Store both for later use
775
770
self ._penv_python = penv_python
0 commit comments