Add makefile config option for linking Python 3 libraries
authorRobbie Cooper <cooperra@users.noreply.github.com>
Thu, 21 Jan 2016 19:11:00 +0000 (14:11 -0500)
committerGil Raphaelli <g@raphaelli.com>
Thu, 21 Jan 2016 19:11:40 +0000 (14:11 -0500)
Makefile
Makefile.config.example

index 985fffd..ac7d12e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -191,7 +191,7 @@ ifeq ($(USE_OPENCV), 1)
        endif
                
 endif
-PYTHON_LIBRARIES := boost_python python2.7
+PYTHON_LIBRARIES ?= boost_python python2.7
 WARNINGS := -Wall -Wno-sign-compare
 
 ##############################
index 1dd6a8f..8fd49c9 100644 (file)
@@ -70,6 +70,11 @@ PYTHON_INCLUDE := /usr/include/python2.7 \
                # $(ANACONDA_HOME)/include/python2.7 \
                # $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
 
+# Uncomment to use Python 3 (default is Python 2)
+# PYTHON_LIBRARIES := boost_python3 python3.5m
+# PYTHON_INCLUDE := /usr/include/python3.5m \
+#                 /usr/lib/python3.5/dist-packages/numpy/core/include
+
 # We need to be able to find libpythonX.X.so or .dylib.
 PYTHON_LIB := /usr/lib
 # PYTHON_LIB := $(ANACONDA_HOME)/lib