summaryrefslogtreecommitdiff
path: root/py/pykms/__init__.py
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-04-26 19:29:08 +0300
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-04-26 19:29:08 +0300
commit07d9958c9028062135bb0dd51ab76b3e15f40298 (patch)
tree0ddbeeeec075713b823e83775b08b584f9cab4c6 /py/pykms/__init__.py
parentcd8bfcffced520e85e5340afa3a303d37ba708fb (diff)
py: Allow building pykms without libutils
Diffstat (limited to 'py/pykms/__init__.py')
-rw-r--r--py/pykms/__init__.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/py/pykms/__init__.py b/py/pykms/__init__.py
index 258b4e0..41447c1 100644
--- a/py/pykms/__init__.py
+++ b/py/pykms/__init__.py
@@ -3,17 +3,18 @@ from enum import Enum
import os
import struct
-#
-# Common RGB colours
-#
-
-red = RGB(255, 0, 0)
-green = RGB(0, 255, 0)
-blue = RGB(0, 0, 255)
-yellow = RGB(255, 255, 0)
-purple = RGB(255, 0, 255)
-white = RGB(255, 255, 255)
-cyan = RGB(0, 255, 255)
+if has_pykmsutils():
+ #
+ # Common RGB colours
+ #
+
+ red = RGB(255, 0, 0)
+ green = RGB(0, 255, 0)
+ blue = RGB(0, 0, 255)
+ yellow = RGB(255, 255, 0)
+ purple = RGB(255, 0, 255)
+ white = RGB(255, 255, 255)
+ cyan = RGB(0, 255, 255)
#
# Rotation enum