From 6f3bd170de176418d08d9f037d4543f51d2e498e Mon Sep 17 00:00:00 2001 From: Tony Theodore Date: Sat, 18 Aug 2018 15:48:55 +1000 Subject: Makefile: check for python2 requirement --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 5209d1e..2f5c367 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,11 @@ LIBTOOL := $(shell glibtool --help >/dev/null 2>&1 && echo g)libtool LIBTOOLIZE := $(shell glibtoolize --help >/dev/null 2>&1 && echo g)libtoolize OPENSSL := openssl PATCH := $(shell gpatch --help >/dev/null 2>&1 && echo g)patch +PYTHON2 := $(or $(shell ([ `python -c "import sys; print('{0[0]}'.format(sys.version_info))"` == 2 ] && echo python) 2>/dev/null || \ + which python2 2>/dev/null || \ + which python2.7 2>/dev/null), \ + $(warning Warning: python v2 not found (or default python changed to v3))\ + $(shell touch check-requirements-failed)) SED := $(shell gsed --help >/dev/null 2>&1 && echo g)sed SORT := $(shell gsort --help >/dev/null 2>&1 && echo g)sort DEFAULT_UA := $(shell wget --version | $(SED) -n 's,GNU \(Wget\) \([0-9.]*\).*,\1/\2,p') -- cgit v0.12