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:
Roland Dobai
2021-02-02 13:20:09 +01:00
parent e22de81955
commit 47f67f8b81
11 changed files with 90 additions and 100 deletions

View File

@@ -5,11 +5,14 @@ set -u
export IDF_PATH=$(cd $(dirname $0); pwd)
echo "Detecting the Python interpreter"
. ${IDF_PATH}/tools/detect_python.sh
echo "Installing ESP-IDF tools"
${IDF_PATH}/tools/idf_tools.py install
${ESP_PYTHON} ${IDF_PATH}/tools/idf_tools.py install
echo "Installing Python environment and packages"
${IDF_PATH}/tools/idf_tools.py install-python-env
${ESP_PYTHON} ${IDF_PATH}/tools/idf_tools.py install-python-env
basedir="$(dirname $0)"
echo "All done! You can now run:"