Skip to content

Commit 9d26049

Browse files
committed
Preserve PYTHONPATH in Makefile
Necessary to locate `grumpy-tools` when building wheel for runtime during `pip install`.
1 parent 9693e46 commit 9d26049

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

grumpy-runtime-src/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,12 @@ PY_DIR := build/lib/python2.7/site-packages
5050
PY_INSTALL_DIR := $(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
5151

5252
export GOPATH := $(ROOT_DIR)/build
53-
export PYTHONPATH := $(ROOT_DIR)/$(PY_DIR)
5453
export PATH := $(ROOT_DIR)/build/bin:$(PATH)
54+
ifndef PYTHONPATH
55+
export PYTHONPATH := $(ROOT_DIR)/$(PY_DIR)
56+
else
57+
export PYTHONPATH := $(PYTHONPATH):$(ROOT_DIR)/$(PY_DIR)
58+
endif
5559

5660
GOPATH_PY_ROOT := $(GOPATH)/src/__python__
5761

0 commit comments

Comments
 (0)