@@ -55,7 +55,7 @@ def get_executable_path(penv_dir, executable_name):
5555 return os .path .join (penv_dir , scripts_dir , f"{ executable_name } { exe_suffix } " )
5656
5757
58- def setup_env_in_package (env , penv_dir ):
58+ def setup_pipenv_in_package (env , penv_dir ):
5959 """
6060 Checks if 'penv' folder exists in platformio dir and creates virtual environment if not.
6161 """
@@ -335,7 +335,7 @@ def setup_python_environment(env, platform, platformio_dir):
335335 penv_dir = os .path .join (platformio_dir , "penv" )
336336
337337 # Setup virtual environment if needed
338- setup_env_in_package (env , penv_dir )
338+ setup_pipenv_in_package (env , penv_dir )
339339
340340 # Set Python Scons Var to env Python
341341 penv_python = get_executable_path (penv_dir , "python" )
@@ -347,17 +347,15 @@ def setup_python_environment(env, platform, platformio_dir):
347347 # Setup Python module search paths
348348 setup_python_paths (penv_dir )
349349
350- # Set executable path from tool uv
350+ # Set executable paths from tools
351+ esptool_binary_path = get_executable_path (penv_dir , "esptool" )
351352 uv_executable = get_executable_path (penv_dir , "uv" )
352353
353354 # Install espressif32 Python dependencies
354355 if not install_python_deps (penv_python , uv_executable ):
355356 sys .stderr .write ("Error: Failed to install Python dependencies into penv\n " )
356357 sys .exit (1 )
357-
358358 # Install esptool after dependencies
359359 install_esptool (env , platform , penv_python , uv_executable )
360- # Set executable path from tool esptool
361- esptool_binary_path = get_executable_path (penv_dir , "esptool" )
362-
360+
363361 return penv_python , esptool_binary_path
0 commit comments