From e0b3d571dddcbfc88278728f8bc5dd8dcae59629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonard=20G=C3=B6hrs?= Date: Wed, 29 May 2024 15:36:30 +0200 Subject: [PATCH] usbsdmux: mqtthelper: update install instructions for paho-mqtt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Starting with commit 41fc814 ("pyproject.toml: switch over the package build to pyproject.toml") there are no REQUIREMENTS*.txt files anymore, including REQUIREMENTS.mqtt.txt. The optional `paho-mqtt` dependency is instead listed in the `pyproject.toml` and can be selected while `pip install`ing. Update the error message to reflect that. Fixes: 41fc814 ("pyproject.toml: switch over the package build to pyproject.toml") Signed-off-by: Leonard Göhrs --- usbsdmux/mqtthelper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usbsdmux/mqtthelper.py b/usbsdmux/mqtthelper.py index 876adaf..be2bb97 100644 --- a/usbsdmux/mqtthelper.py +++ b/usbsdmux/mqtthelper.py @@ -132,7 +132,7 @@ def _gather_data(ctl, sg, mode): def publish_info(ctl, config, sg, mode): """ Publish info to mqtt server, if mqtt is enabled. - This requires installing REQUIREMENTS.mqtt.txt. + This requires installing paho-mqtt. """ if not config.mqtt_enabled: @@ -146,7 +146,9 @@ def publish_info(ctl, config, sg, mode): except ImportError: print( "Sending data to an mqtt server requires paho-mqtt", - "Please install REQUIREMENTS.mqtt.txt", + "Please install it, e.g. by installing usbsdmux via:", + "", + ' python3 -m pip install "usbsdmux[mqtt]"', sep="\n", file=sys.stderr, )