From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> Currently in order to disable test the variable needs to be explicitly set to GPIOD_WITH_TESTS= in the environment or setup.py will crash. Assume tests should not be built if the variable is not set at all. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> --- bindings/python/setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 2a8481c..c90d7d7 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -28,8 +28,7 @@ gpiosim_ext = Extension( ) extensions = [gpiod_ext] -with_tests = bool(environ["GPIOD_WITH_TESTS"]) -if with_tests: +if "GPIOD_WITH_TESTS" in environ and environ["GPIOD_WITH_TESTS"] == "1": extensions.append(gpiosim_ext) with open("gpiod/version.py", "r") as fd: -- 2.37.2