Skip to content

Commit f1370e7

Browse files
authored
Update penv_setup.py
1 parent 55be151 commit f1370e7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

builder/penv_setup.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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_pipenv_in_package(env, penv_dir):
58+
def setup_env_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_pipenv_in_package(env, penv_dir)
338+
setup_env_in_package(env, penv_dir)
339339

340340
# Set Python Scons Var to env Python
341341
penv_python = get_executable_path(penv_dir, "python")
@@ -347,15 +347,17 @@ def setup_python_environment(env, platform, platformio_dir):
347347
# Setup Python module search paths
348348
setup_python_paths(penv_dir)
349349

350-
# Set executable paths from tools
351-
esptool_binary_path = get_executable_path(penv_dir, "esptool")
350+
# Set executable path from tool uv
352351
uv_executable = get_executable_path(penv_dir, "uv")
353352

354353
# Install espressif32 Python dependencies
355354
if not install_python_deps(penv_python, uv_executable):
356355
sys.stderr.write("Error: Failed to install Python dependencies into penv\n")
357356
sys.exit(1)
357+
358358
# Install esptool after dependencies
359359
install_esptool(env, platform, penv_python, uv_executable)
360-
360+
# Set executable path from tool esptool
361+
esptool_binary_path = get_executable_path(penv_dir, "esptool")
362+
361363
return penv_python, esptool_binary_path

0 commit comments

Comments
 (0)