mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-22 17:02:25 +00:00
Tools: Allow custom Python installation path with IDF_PYTHON_ENV_PATH
IDF_PYTHON_ENV_PATH is the path where the Python environment is created and used. By default it is inside IDF_TOOLS_PATH. IDF_PYTHON_ENV_PATH was exported by idf_tools.py but was not imported back. This fixes the issue and ESP-IDF will honor the value of IDF_PYTHON_ENV_PATH. Closes https://github.com/espressif/esp-idf/issues/10489
This commit is contained in:
@@ -1357,8 +1357,8 @@ def get_python_env_path() -> Tuple[str, str, str, str]:
|
||||
python_ver_major_minor = '{}.{}'.format(sys.version_info.major, sys.version_info.minor)
|
||||
|
||||
idf_version = get_idf_version()
|
||||
idf_python_env_path = os.path.join(global_idf_tools_path or '', 'python_env',
|
||||
'idf{}_py{}_env'.format(idf_version, python_ver_major_minor))
|
||||
idf_python_env_path = os.getenv('IDF_PYTHON_ENV_PATH') or os.path.join(global_idf_tools_path or '', 'python_env',
|
||||
'idf{}_py{}_env'.format(idf_version, python_ver_major_minor))
|
||||
|
||||
python_exe, subdir = get_python_exe_and_subdir()
|
||||
idf_python_export_path = os.path.join(idf_python_env_path, subdir)
|
||||
|
Reference in New Issue
Block a user