mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
Merge branch 'fix/honor_idf_python_env_path_v5.4' into 'release/v5.4'
fix(tools): honor IDF_PYTHON_ENV_PATH value (v5.4) See merge request espressif/esp-idf!35873
This commit is contained in:
commit
1e788836a5
@ -29,7 +29,6 @@ except ImportError as e:
|
||||
|
||||
# Get ESP-IDF venv python path
|
||||
idf_tools.g.idf_path = idf_path
|
||||
os.environ['IDF_PYTHON_ENV_PATH'] = '' # let idf_tools get the pyenv path
|
||||
idf_tools.g.idf_tools_path = os.environ.get('IDF_TOOLS_PATH') or os.path.expanduser(idf_tools.IDF_TOOLS_PATH_DEFAULT)
|
||||
idf_python_env_path, idf_python_export_path, virtualenv_python, idf_version = idf_tools.get_python_env_path()
|
||||
|
||||
@ -39,7 +38,9 @@ os.environ['IDF_PYTHON_ENV_PATH'] = idf_python_env_path
|
||||
os.environ['ESP_IDF_VERSION'] = idf_version
|
||||
|
||||
if not os.path.exists(virtualenv_python):
|
||||
die(f'ESP-IDF Python virtual environment not found. Please run the install script to set it up before proceeding.')
|
||||
die((f'ESP-IDF Python virtual environment "{virtualenv_python}" '
|
||||
f'not found. Please run the install script to set it up before '
|
||||
f'proceeding.'))
|
||||
|
||||
try:
|
||||
run([virtualenv_python, os.path.join(idf_path, 'tools', 'export_utils', 'activate_venv.py')] + sys.argv[1:], check=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user