From 07d9958c9028062135bb0dd51ab76b3e15f40298 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Sat, 26 Apr 2025 19:29:08 +0300 Subject: py: Allow building pykms without libutils --- py/pykms/__init__.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'py/pykms/__init__.py') 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 -- cgit v1.2.3