You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 23, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: Makefile
+14-5Lines changed: 14 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -21,8 +21,15 @@ GOOS ?= $(word 1,$(GO_ENV))
21
21
GOARCH ?= $(word 2,$(GO_ENV))
22
22
ROOT_DIR := $(realpath .)
23
23
PKG_DIR := build/pkg/$(GOOS)_$(GOARCH)
24
+
PYTHON ?= python
25
+
PYTHON_BIN := $(shell which $(PYTHON))
26
+
PYTHON_VER := $(word 2,$(shell$(PYTHON) -V 2>&1))
24
27
PY_DIR := build/lib/python2.7/site-packages
25
28
29
+
ifeq ($(filter 2.7.%,$(PYTHON_VER)),)
30
+
$(error unsupported Python version $(PYTHON_VER), Grumpy only supports 2.7.x. To use a different python binary such as python2, run: 'make PYTHON=python2 ...')
31
+
endif
32
+
26
33
exportGOPATH := $(ROOT_DIR)/build
27
34
exportPYTHONPATH := $(ROOT_DIR)/$(PY_DIR)
28
35
exportPATH := $(ROOT_DIR)/build/bin:$(PATH)
@@ -90,30 +97,32 @@ precommit: cover gofmt lint test
0 commit comments