Skip to content

Build failed due to python setuptools version. #1603

@trairia

Description

@trairia

pkg_resources module has obsolete on python-setuptools 82.0.0.
So nanopb_generator.py fails generate code.

My build environment are following.

  • commit: 89d446e
  • Build Platform: Windows 11
  • CMake: 4.2.3
  • Python: 3.14.2
  • nodejs: v24.13.0
PATH/TO/GP2040-CE/build> ninja
(snip)
FAILED: proto/config.pb.c proto/config.pb.h proto/enums.pb.c proto/enums.pb.h C:/Users/trairia/rpi/GP2040-CE/build/proto/config.pb.c C:/Users/trairia/rpi/GP2040-CE/build/proto/config.pb.h C:/Users/trairia/rpi/GP2040-CE/build/proto/enums.pb.c C:/Users/trairia/rpi/GP2040-CE/build/proto/enums.pb.h
C:\WINDOWS\system32\cmd.exe /C "cd /D C:\Users\trairia\rpi\GP2040-CE && "C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/Users/trairia/rpi/GP2040-CE/build/proto && C:\Users\trairia\rpi\GP2040-CE\build\venv\Scripts\python C:/Users/trairia/rpi/GP2040-CE/lib/nanopb/generator/nanopb_generator.py -q -D C:/Users/trairia/rpi/GP2040-CE/build/proto -I C:/Users/trairia/rpi/GP2040-CE/proto -I C:/Users/trairia/rpi/GP2040-CE/lib/nanopb/generator/proto C:/Users/trairia/rpi/GP2040-CE/proto/enums.proto && C:\Users\trairia\rpi\GP2040-CE\build\venv\Scripts\python C:/Users/trairia/rpi/GP2040-CE/lib/nanopb/generator/nanopb_generator.py -q -D C:/Users/trairia/rpi/GP2040-CE/build/proto -I C:/Users/trairia/rpi/GP2040-CE/proto -I C:/Users/trairia/rpi/GP2040-CE/lib/nanopb/generator/proto C:/Users/trairia/rpi/GP2040-CE/proto/config.proto"
Traceback (most recent call last):
  File "C:\Users\trairia\rpi\GP2040-CE\lib\nanopb\generator\nanopb_generator.py", line 53, in <module>
    import proto
  File "C:\Users\trairia\rpi\GP2040-CE\lib\nanopb\generator\proto\__init__.py", line 10, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

I think it need to specify setuptools version in requirements.txt.
Or need upgrade nanopb source to ver 0.4.9 or later

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug in the firmware - Something is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions