From 18d93ba417a2fc72718b81607cbc0e7303659dde Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Wed, 10 Sep 2025 12:07:03 +0530 Subject: [PATCH] ci: hackishly install construct to work with idf-v4.4 and Python-3.12 construct==2.10.54 import imp which is not present in the Python3.12 so download the package source, patch it and install --- .gitlab-ci.yml | 7 +++++++ requirements_idf_v4.4.txt | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 61d98b17e..68774e0fb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -481,6 +481,13 @@ build_esp_matter_examples_pytest_C3_idf_v4_4: # idf v4.4 requires jinja < 3.1 so lets install the dependencies for idf v4.4 - pip install -r requirements_idf_v4.4.txt - pip install -r tools/ci/requirements-build.txt + # hack the construct==2.10.54 to make it work with idf-v4.4, Python3.12 + # imp is not present in Python3.12 so remove it + - wget https://files.pythonhosted.org/packages/30/2f/e2e6bad1b80f744cf5c2a6d622e3dee698b43e6c040f980ae0ac0edd5e54/construct-2.10.54.tar.gz + - tar -xvzf construct-2.10.54.tar.gz + - sed -i 's/, imp$//g' construct-2.10.54/construct/core.py + - python3 -m pip install ./construct-2.10.54 + - rm -rf construct-2.10.54* - python tools/ci/build_apps.py ./examples --pytest_c3 variables: IDF_CHECKOUT_REF: "v4.4.3" diff --git a/requirements_idf_v4.4.txt b/requirements_idf_v4.4.txt index 797438700..c33a1805a 100644 --- a/requirements_idf_v4.4.txt +++ b/requirements_idf_v4.4.txt @@ -14,4 +14,3 @@ urllib3<2 # esp-secure-cert-tool (dependency of esp-matter-mfg-tool) requires construct>=2.10.70 # but ESP-IDF v4.4 hard pins construct==2.10.54, creating an unsolvable conflict # esp-matter-mfg-tool>=1.0.4 -construct==2.10.54