From 1fa9db53bd197be26392e0e1eb878ec587726e37 Mon Sep 17 00:00:00 2001 From: Marek Fiala Date: Tue, 26 Nov 2024 10:37:52 +0100 Subject: [PATCH 1/2] fix(tools): IDF_PATH_OLD not found in PowerShell Closes https://github.com/espressif/esp-idf/issues/15396 --- tools/activate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/activate.py b/tools/activate.py index 42a16cfb24..b8938a2969 100755 --- a/tools/activate.py +++ b/tools/activate.py @@ -43,7 +43,7 @@ if not os.path.exists(virtualenv_python): f'proceeding.')) try: - run([virtualenv_python, os.path.join(idf_path, 'tools', 'export_utils', 'activate_venv.py')] + sys.argv[1:], check=True) + run([virtualenv_python, os.path.join(idf_path, 'tools', 'export_utils', 'activate_venv.py')] + sys.argv[1:], check=True, env=os.environ.copy()) except (OSError, SubprocessError): die('\n'.join(['Activation script failed', 'To view detailed debug information, set ESP_IDF_EXPORT_DEBUG=1 and run the export script again.'])) From 1de2bee28fc857f297d022a972b90bea0536cf12 Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Tue, 10 Dec 2024 08:48:43 +0100 Subject: [PATCH 2/2] fix(tools): honor IDF_PYTHON_ENV_PATH value The active.py script is currently clearing the IDF_PYTHON_ENV_PATH, preventing it from being set to a custom location for the python virtual environment directory. Although the install script checks to ensure that an existing python virtual environment is not overwritten with one for a different ESP-IDF version than it was originally created for, we should still permit setting a custom path for the python virtual environment. Closes https://github.com/espressif/esp-idf/issues/15006 Signed-off-by: Frantisek Hrbata --- tools/activate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/activate.py b/tools/activate.py index b8938a2969..7c325705fb 100755 --- a/tools/activate.py +++ b/tools/activate.py @@ -44,6 +44,6 @@ if not os.path.exists(virtualenv_python): try: run([virtualenv_python, os.path.join(idf_path, 'tools', 'export_utils', 'activate_venv.py')] + sys.argv[1:], check=True, env=os.environ.copy()) -except (OSError, SubprocessError): - die('\n'.join(['Activation script failed', +except (OSError, SubprocessError) as e: + die('\n'.join(['Activation script failed', str(e), 'To view detailed debug information, set ESP_IDF_EXPORT_DEBUG=1 and run the export script again.']))