From 69cee70c540b05d6ff38069f0b88f5eb59572f67 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Wed, 25 Sep 2019 18:33:48 -0400 Subject: [PATCH] Require python3 to install Open CAS Linux. Signed-off-by: Michal Mielewczyk --- utils/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/Makefile b/utils/Makefile index f93d708..dca0223 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -7,6 +7,7 @@ CASCTL_DIR = /lib/opencas UDEVRULES_DIR = /lib/udev/rules.d UDEV:=$(shell which udevadm) SYSTEMCTL := $(shell which systemctl) +PYTHON3 := $(shell which python3 &> /dev/null && echo 1) ifeq (, $(shell which systemctl)) define cas_install @@ -32,6 +33,9 @@ endif all: ; install: +ifneq (1, $(PYTHON3)) + $(error package 'python3' not found) +else @echo "Installing Open-CAS utils" @install -m 755 -d $(CASCTL_DIR) @@ -52,6 +56,7 @@ install: @install -m 644 casctl.8 /usr/share/man/man8/casctl.8 $(cas_install) +endif uninstall: @rm $(CASCTL_DIR)/opencas.py