Commit 587a5134 authored by Alexander F Rødseth's avatar Alexander F Rødseth Committed by Dylan Trotter

Check if python2 exists before defaulting to python (#156)

parent b65b3b89
......@@ -21,7 +21,15 @@ GOOS ?= $(word 1,$(GO_ENV))
GOARCH ?= $(word 2,$(GO_ENV))
ROOT_DIR := $(realpath .)
PKG_DIR := build/pkg/$(GOOS)_$(GOARCH)
PYTHON ?= python
# Try python2 and then python if PYTHON has not been set
ifeq ($(PYTHON),)
ifneq ($(shell which python2),)
PYTHON = python2
else
PYTHON = python
endif
endif
PYTHON_BIN := $(shell which $(PYTHON))
PYTHON_VER := $(word 2,$(shell $(PYTHON) -V 2>&1))
PY_DIR := build/lib/python2.7/site-packages
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment