[Buildroot] Error compiling python-paho-mqtt v2.1.0 in buildroot version 2022.02.1

Marcus Hoffmann buildroot at bubu1.eu
Mon Feb 3 13:51:29 UTC 2025


Hi Oscar,


On 31.01.25 22:02, Oscar Gomez Fuente wrote:
> Hi everyone,
> 
> I need to update the python-paho-mqtt package version from 1.4.0 to
> 2.1.0, so I have changed these files:
> 
> ../package/python-paho-mqtt/python-paho-mqtt.mk
> ../package/python-paho-mqtt/python-paho-mqtt.hash
> 
> So far so good, but it seems to be something has changed because I've
> got this error:
> ../buildroot-2022.02.1/output/host/bin/python: can't open file
> '/home/USERNAME/GIT/raspberrypi/buildroot-2022.02.1/output/build/python-paho-mqtt-2.1.0/setup.py':
> [Errno 2] No such file or directory
> 
> I was analyzing how it is the .mk file in the current version, and it
> seems to be that the PYTHON_PAHO_MQTT_SETUP_TYPE method has changed
> from setuptools to hatch.

This is because upstream paho.mqtt.python no longer uses setuptools but 
indeed hatch(ling) as a build backend: 
https://github.com/eclipse-paho/paho.mqtt.python/blob/v2.1.0/pyproject.toml#L3

> 
> Can compile this package using the old method
> (PYTHON_PAHO_MQTT_SETUP_TYPE = setptool) with buildroot-2022.02.1? The
> buildroot-2022-02.1 version doesn't support the hatch method. Any
> suggestion ?

Besides upgrading to a newer buildroot version, I don't think you have 
many options unfortunately. Buildroot 2022.02 has no infrastructure for 
python packages that use the pep517 build systems 
(https://peps.python.org/pep-0517/)


> 
> Best regards,
> Óscar Gómez Fuente.
Best,
Marcus


More information about the buildroot mailing list