@@ -55,7 +55,7 @@ def get_executable_path(penv_dir, executable_name):
55
55
return os .path .join (penv_dir , scripts_dir , f"{ executable_name } { exe_suffix } " )
56
56
57
57
58
- def setup_env_in_package (env , penv_dir ):
58
+ def setup_pipenv_in_package (env , penv_dir ):
59
59
"""
60
60
Checks if 'penv' folder exists in platformio dir and creates virtual environment if not.
61
61
"""
@@ -335,7 +335,7 @@ def setup_python_environment(env, platform, platformio_dir):
335
335
penv_dir = os .path .join (platformio_dir , "penv" )
336
336
337
337
# Setup virtual environment if needed
338
- setup_env_in_package (env , penv_dir )
338
+ setup_pipenv_in_package (env , penv_dir )
339
339
340
340
# Set Python Scons Var to env Python
341
341
penv_python = get_executable_path (penv_dir , "python" )
@@ -347,17 +347,15 @@ def setup_python_environment(env, platform, platformio_dir):
347
347
# Setup Python module search paths
348
348
setup_python_paths (penv_dir )
349
349
350
- # Set executable path from tool uv
350
+ # Set executable paths from tools
351
+ esptool_binary_path = get_executable_path (penv_dir , "esptool" )
351
352
uv_executable = get_executable_path (penv_dir , "uv" )
352
353
353
354
# Install espressif32 Python dependencies
354
355
if not install_python_deps (penv_python , uv_executable ):
355
356
sys .stderr .write ("Error: Failed to install Python dependencies into penv\n " )
356
357
sys .exit (1 )
357
-
358
358
# Install esptool after dependencies
359
359
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
+
363
361
return penv_python , esptool_binary_path
0 commit comments