mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 09:09:10 -04:00
feat: Drop Python 3.8 support
Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
This commit is contained in:
parent
1689c7e14f
commit
a4acbd2758
@ -234,7 +234,7 @@ pytest_build_system_macos:
|
|||||||
- macos_shell
|
- macos_shell
|
||||||
parallel: 3
|
parallel: 3
|
||||||
variables:
|
variables:
|
||||||
PYENV_VERSION: "3.8"
|
PYENV_VERSION: "3.9"
|
||||||
# CCACHE_DIR: "/cache/idf_ccache". On macOS, you cannot write to this folder due to insufficient permissions.
|
# CCACHE_DIR: "/cache/idf_ccache". On macOS, you cannot write to this folder due to insufficient permissions.
|
||||||
CCACHE_DIR: "" # ccache will use "$HOME/Library/Caches/ccache".
|
CCACHE_DIR: "" # ccache will use "$HOME/Library/Caches/ccache".
|
||||||
CCACHE_MAXSIZE: "5G" # To preserve the limited Macbook storage. CCACHE automatically prunes old caches to fit the set limit.
|
CCACHE_MAXSIZE: "5G" # To preserve the limited Macbook storage. CCACHE automatically prunes old caches to fit the set limit.
|
||||||
|
@ -55,8 +55,8 @@ variables:
|
|||||||
CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py"
|
CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py"
|
||||||
|
|
||||||
# Docker images
|
# Docker images
|
||||||
ESP_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-env-v5.5:1"
|
ESP_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-env-v5.5:2"
|
||||||
ESP_IDF_DOC_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-doc-env-v5.5:1-1"
|
ESP_IDF_DOC_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-doc-env-v5.5:2-1"
|
||||||
TARGET_TEST_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/target-test-env-v5.5:2"
|
TARGET_TEST_ENV_IMAGE: "${CI_DOCKER_REGISTRY}/target-test-env-v5.5:2"
|
||||||
SONARQUBE_SCANNER_IMAGE: "${CI_DOCKER_REGISTRY}/sonarqube-scanner:5"
|
SONARQUBE_SCANNER_IMAGE: "${CI_DOCKER_REGISTRY}/sonarqube-scanner:5"
|
||||||
PRE_COMMIT_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-pre-commit:1"
|
PRE_COMMIT_IMAGE: "${CI_DOCKER_REGISTRY}/esp-idf-pre-commit:1"
|
||||||
|
@ -347,6 +347,7 @@ test_pytest_macos:
|
|||||||
reports:
|
reports:
|
||||||
junit: XUNIT_RESULT.xml
|
junit: XUNIT_RESULT.xml
|
||||||
variables:
|
variables:
|
||||||
|
PYENV_VERSION: "3.9"
|
||||||
PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1"
|
PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1"
|
||||||
script:
|
script:
|
||||||
- run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -v
|
- run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -v
|
||||||
|
@ -131,7 +131,7 @@ For more detailed information about integrating ESP-IDF with CMake into an IDE,
|
|||||||
Setting up the Python Interpreter
|
Setting up the Python Interpreter
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
ESP-IDF works well with Python version 3.8+.
|
ESP-IDF works well with Python version 3.9+.
|
||||||
|
|
||||||
``idf.py`` and other Python scripts will run with the default Python interpreter, i.e., ``python``. You can switch to a different one like ``python3 $IDF_PATH/tools/idf.py ...``, or you can set up a shell alias or another script to simplify the command.
|
``idf.py`` and other Python scripts will run with the default Python interpreter, i.e., ``python``. You can switch to a different one like ``python3 $IDF_PATH/tools/idf.py ...``, or you can set up a shell alias or another script to simplify the command.
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ IDF Docker image (``espressif/idf``) is intended for building applications and l
|
|||||||
The image contains:
|
The image contains:
|
||||||
|
|
||||||
- Common utilities such as ``git``, ``wget``, ``curl``, and ``zip``.
|
- Common utilities such as ``git``, ``wget``, ``curl``, and ``zip``.
|
||||||
- Python 3.8 or newer.
|
- Python 3.9 or newer.
|
||||||
- A copy of a specific version of ESP-IDF. See below for information about versions. ``IDF_PATH`` environment variable is set and points to the ESP-IDF location in the container.
|
- A copy of a specific version of ESP-IDF. See below for information about versions. ``IDF_PATH`` environment variable is set and points to the ESP-IDF location in the container.
|
||||||
- All the build tools required for the specific version of ESP-IDF: CMake, Ninja, cross-compiler toolchains, etc.
|
- All the build tools required for the specific version of ESP-IDF: CMake, Ninja, cross-compiler toolchains, etc.
|
||||||
- All Python packages required by ESP-IDF are installed in a virtual environment.
|
- All Python packages required by ESP-IDF are installed in a virtual environment.
|
||||||
|
@ -160,7 +160,7 @@ With some Linux distributions, you may get the error message similar to ``Could
|
|||||||
Python Compatibility
|
Python Compatibility
|
||||||
~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
ESP-IDF supports Python 3.8 or newer. It is recommended to upgrade your operating system to a recent version satisfying this requirement. Other options include the installation of Python from `sources <https://www.python.org/downloads/>`_ or the use of a Python version management system such as `pyenv <https://github.com/pyenv/pyenv>`_.
|
ESP-IDF supports Python 3.9 or newer. It is recommended to upgrade your operating system to a recent version satisfying this requirement. Other options include the installation of Python from `sources <https://www.python.org/downloads/>`_ or the use of a Python version management system such as `pyenv <https://github.com/pyenv/pyenv>`_.
|
||||||
|
|
||||||
.. only:: esp32 or esp32s2 or esp32s3
|
.. only:: esp32 or esp32s2 or esp32s3
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ idf.py
|
|||||||
设置 Python 解释器
|
设置 Python 解释器
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
ESP-IDF 适用于 Python 3.8 以上版本。
|
ESP-IDF 适用于 Python 3.9 以上版本。
|
||||||
|
|
||||||
``idf.py`` 和其他的 Python 脚本会使用默认的 Python 解释器运行,如 ``python``。你可以通过 ``python3 $IDF_PATH/tools/idf.py ...`` 命令切换到别的 Python 解释器,或者通过设置 shell 别名或其他脚本来简化该命令。
|
``idf.py`` 和其他的 Python 脚本会使用默认的 Python 解释器运行,如 ``python``。你可以通过 ``python3 $IDF_PATH/tools/idf.py ...`` 命令切换到别的 Python 解释器,或者通过设置 shell 别名或其他脚本来简化该命令。
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ IDF Docker 镜像 (``espressif/idf``) 为使用特定版本的 ESP-IDF 自动化
|
|||||||
该镜像包含以下内容:
|
该镜像包含以下内容:
|
||||||
|
|
||||||
- 常见的实用工具,如 ``git``、``wget``、``curl`` 和 ``zip``。
|
- 常见的实用工具,如 ``git``、``wget``、``curl`` 和 ``zip``。
|
||||||
- Python 3.8 或更高版本。
|
- Python 3.9 或更高版本。
|
||||||
- 特定版本 ESP-IDF 的副本。有关版本信息,请参阅下文。该副本中设置了 ``IDF_PATH`` 环境变量,并指向容器中 ESP-IDF 的位置。
|
- 特定版本 ESP-IDF 的副本。有关版本信息,请参阅下文。该副本中设置了 ``IDF_PATH`` 环境变量,并指向容器中 ESP-IDF 的位置。
|
||||||
- 构建特定版本 ESP-IDF 所需工具:CMake、Ninja、交叉编译器工具链等。
|
- 构建特定版本 ESP-IDF 所需工具:CMake、Ninja、交叉编译器工具链等。
|
||||||
- ESP-IDF 需要的所有 Python 软件包。这些软件包均已安装在虚拟环境中。
|
- ESP-IDF 需要的所有 Python 软件包。这些软件包均已安装在虚拟环境中。
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
兼容的 Python 版本
|
兼容的 Python 版本
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
ESP-IDF 支持 Python 3.8 及以上版本,建议升级操作系统到最新版本从而更新 Python。也可选择从 `sources <https://www.python.org/downloads/>`_ 安装最新版 Python,或使用 Python 管理系统如 `pyenv <https://github.com/pyenv/pyenv>`_ 对版本进行升级管理。
|
ESP-IDF 支持 Python 3.9 及以上版本,建议升级操作系统到最新版本从而更新 Python。也可选择从 `sources <https://www.python.org/downloads/>`_ 安装最新版 Python,或使用 Python 管理系统如 `pyenv <https://github.com/pyenv/pyenv>`_ 对版本进行升级管理。
|
||||||
|
|
||||||
.. only:: esp32 or esp32s2 or esp32s3
|
.. only:: esp32 or esp32s2 or esp32s3
|
||||||
|
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
# This is a port of detect_python.sh. More information are provided there.
|
# This is a port of detect_python.sh. More information are provided there.
|
||||||
|
|
||||||
set OLDEST_PYTHON_SUPPORTED_MAJOR 3
|
set OLDEST_PYTHON_SUPPORTED_MAJOR 3
|
||||||
set OLDEST_PYTHON_SUPPORTED_MINOR 8
|
set OLDEST_PYTHON_SUPPORTED_MINOR 9
|
||||||
|
|
||||||
set -x ESP_PYTHON python
|
set -x ESP_PYTHON python
|
||||||
|
|
||||||
for p_cmd in python3 python python3.8 python3.9 python3.10 python3.11 python3.12;
|
for p_cmd in python3 python python3.9 python3.10 python3.11 python3.12 python3.13;
|
||||||
$p_cmd --version >/dev/null 2>&1; or continue
|
$p_cmd --version >/dev/null 2>&1; or continue
|
||||||
echo "Checking \"$p_cmd\" ..."
|
echo "Checking \"$p_cmd\" ..."
|
||||||
|
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
# 3. If required version of python is not found, script will fail
|
# 3. If required version of python is not found, script will fail
|
||||||
|
|
||||||
OLDEST_PYTHON_SUPPORTED_MAJOR=3
|
OLDEST_PYTHON_SUPPORTED_MAJOR=3
|
||||||
OLDEST_PYTHON_SUPPORTED_MINOR=8
|
OLDEST_PYTHON_SUPPORTED_MINOR=9
|
||||||
|
|
||||||
ESP_PYTHON=python
|
ESP_PYTHON=python
|
||||||
|
|
||||||
for p_cmd in python3 python python3.8 python3.9 python3.10 python3.11 python3.12; do
|
for p_cmd in python3 python python3.9 python3.10 python3.11 python3.12 python3.13; do
|
||||||
$p_cmd --version >/dev/null 2>&1 || continue
|
$p_cmd --version >/dev/null 2>&1 || continue
|
||||||
echo "Checking \"$p_cmd\" ..."
|
echo "Checking \"$p_cmd\" ..."
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
#
|
#
|
||||||
# SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
# SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
@ -8,9 +8,8 @@
|
|||||||
#
|
#
|
||||||
# There are related tools/detect_python.{sh,fish} scripts which are called earlier when the paths are not properly
|
# There are related tools/detect_python.{sh,fish} scripts which are called earlier when the paths are not properly
|
||||||
# set-up and they only intend to prefer the use of Python 3 over Python 2. Why not more? All possible executables
|
# set-up and they only intend to prefer the use of Python 3 over Python 2. Why not more? All possible executables
|
||||||
# (python3.8, python3.9, ...) cannot be hardcoded there and at the end, the user is responsible to set-up a system
|
# (python3.9, python3.10, ...) cannot be hardcoded there and at the end, the user is responsible to set-up a system
|
||||||
# where "python" or "python3" of compatible version is available.
|
# where "python" or "python3" of compatible version is available.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -20,7 +19,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
OLDEST_PYTHON_SUPPORTED = (3, 8) # keep it as tuple for comparison with sys.version_info
|
OLDEST_PYTHON_SUPPORTED = (3, 9) # keep it as tuple for comparison with sys.version_info
|
||||||
|
|
||||||
|
|
||||||
def _ver_to_str(it): # type: (Iterable) -> str
|
def _ver_to_str(it): # type: (Iterable) -> str
|
||||||
|
Loading…
x
Reference in New Issue
Block a user