NCS toolchain 2.8 cannot run twister tests because ncs toolchain python missing pkwalify

I have a project based on NCS 2.8 and using toolchain 2.8.  In order to use claude code, I have setup a WSL container which includes a python venv.  I'm able to build in the WSL container as long as I pass -DNCS_TOOLCHAIN_VERSION="NONE" I can also get claude code to properly build as long as I provide instructions on setting up the virtualenv and passing the -DNCS_TOOLCHAIN_VERSION argument.

Now I'm trying to implement emulated tests that can be run by twister, however every time twister runs a test the build fails because it doesn't have -DNCS_TOOLCHAIN_VERSION and the build proceeds to use /home/antho/ncs/toolchains/b81a7cd864/usr/local/bin/python3  which lacks pkwalify:

Loading Zephyr default modules (Zephyr base).
-- Application: /home/antho/zwork_1/app.git/tests/drivers/pmic/ciye_battery
-- CMake version: 3.28.3
-- Using NCS Toolchain 2.8.20241106.790718371940 for building. (/home/antho/ncs/toolchains/b81a7cd864/cmake)
-- Found Python3: /home/antho/ncs/toolchains/b81a7cd864/usr/local/bin/python3 -(found suitable version "3.12.3", minimum required is "3.8") found components: Interpreter
-- Cache files will be written to: /home/antho/.cache/zephyr
-- Zephyr version: 3.7.99 (/home/antho/zwork_1/zephyr)

CMake Error at /home/antho/zwork_1/zephyr/cmake/modules/boards.cmake:196 (message):
Error finding board: qemu_cortex_m0

Error message: Traceback (most recent call last):

File "/home/antho/zwork_1/zephyr/scripts/list_boards.py", line 11, in <module>
import pykwalify.core

ModuleNotFoundError: No module named 'pykwalify'

Call Stack (most recent call first):
/home/antho/zwork_1/zephyr/cmake/modules/zephyr_default.cmake:133 (include)
/home/antho/zwork_1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
/home/antho/zwork_1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!

Is there a recommended way to avoid using the crippled python in the NCS toolchain?

Parents Reply Children
No Data
Related