tools: Prefer python3 during install and export
Install and export script should work on systems without "python" executable. Closes https://github.com/espressif/esp-idf/pull/6471 Closes https://github.com/espressif/esp-idf/issues/6532 Related to https://github.com/espressif/esp-idf/issues/6421 and https://github.com/espressif/arduino-esp32/issues/4717
This commit is contained in:
@@ -8,11 +8,14 @@ function idf_export_main
|
||||
|
||||
set oldpath = $PATH
|
||||
|
||||
echo "Detecting the Python interpreter"
|
||||
source "$IDF_PATH"/tools/detect_python.fish
|
||||
|
||||
echo "Adding ESP-IDF tools to PATH..."
|
||||
# Call idf_tools.py to export tool paths
|
||||
set -x IDF_TOOLS_EXPORT_CMD "$IDF_PATH"/export.fish
|
||||
set -x IDF_TOOLS_INSTALL_CMD "$IDF_PATH"/install.fish
|
||||
set idf_exports ("$IDF_PATH"/tools/idf_tools.py export) || return 1
|
||||
set idf_exports ("$ESP_PYTHON" "$IDF_PATH"/tools/idf_tools.py export) || return 1
|
||||
eval "$idf_exports"
|
||||
|
||||
echo "Checking if Python packages are up to date..."
|
||||
@@ -50,6 +53,7 @@ function idf_export_main
|
||||
set -e path_entry
|
||||
set -e IDF_ADD_PATHS_EXTRAS
|
||||
set -e idf_exports
|
||||
set -e ESP_PYTHON
|
||||
|
||||
# Not unsetting IDF_PYTHON_ENV_PATH, it can be used by IDF build system
|
||||
# to check whether we are using a private Python environment
|
||||
|
||||
Reference in New Issue
Block a user