diff mbox series

swupdateclient: setup.py: Add install_requires

Message ID 20230305150639.410310-1-festevam@gmail.com
State Changes Requested
Headers show
Series swupdateclient: setup.py: Add install_requires | expand

Commit Message

Fabio Estevam March 5, 2023, 3:06 p.m. UTC
From: Fabio Estevam <festevam@denx.de>

Add install_requires section so that termcolor and websockets dependencies
can he installed automatically.

This fixes the following run-time problem when a dependency
is missing:

$ swupdateclient
Traceback (most recent call last):
  File "/home/fabio/.local/bin/swupdateclient", line 5, in <module>
    from swupdateclient.main import main
  File "/home/fabio/.local/lib/python3.10/site-packages/swupdateclient/main.py", line 19, in <module>
    from termcolor import colored
ModuleNotFoundError: No module named 'termcolor'

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 tools/python/swupdateclient/setup.py | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/tools/python/swupdateclient/setup.py b/tools/python/swupdateclient/setup.py
index be05d0b1beb3..22a8dc6561a9 100644
--- a/tools/python/swupdateclient/setup.py
+++ b/tools/python/swupdateclient/setup.py
@@ -17,5 +17,9 @@  setup(
             "swupdateclient=swupdateclient.main:main",
         ],
     },
+    install_requires=[
+        'termcolor',
+        'websockets',
+    ],
     python_requires=">=3.8",
 )