From 8b9a3885eb9ee7e48e17cf7eac071827aa117734 Mon Sep 17 00:00:00 2001 From: Leandro Date: Mon, 27 Apr 2020 16:55:03 -0300 Subject: [PATCH] Add minium python version check --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 19ed9735..c3738950 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,14 @@ ASSEST_PATH = assets/linux INSTALL_PATH = /usr/share/flatcam-beta APPS_PATH = /usr/share/applications +MIN_PY3_MINOR_VERSION := 5 +PY3_MINOR_VERSION := $(shell python3 --version | cut -d'.' -f2) + +ifneq ($(MIN_PY3_MINOR_VERSION), $(firstword $(sort $(PY3_MINOR_VERSION) $(MIN_PY3_MINOR_VERSION)))) + $(info Current python version is "3.$(PY3_MINOR_VERSION)") + $(error You must have at least 3.$(MIN_PY3_MINOR_VERSION) installed) +endif + install: ifeq ($(USER_ID), 0) @ echo "Installing it system-wide"