Py3 fixes for embedded example.
authorRobert Bradshaw <robertwb@math.washington.edu>
Fri, 8 Jan 2010 07:55:57 +0000 (23:55 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Fri, 8 Jan 2010 07:55:57 +0000 (23:55 -0800)
Demos/embed/Makefile

index bec7335b74dd0c5b91a1bf37b9b1e5786cf803b3..5d05c4e2085bb6060afbec88a201566e9bb7b21c 100644 (file)
@@ -1,11 +1,11 @@
 # Makefile for creating our standalone Cython program
-PYVERSION=$(shell python -c "import sys; print sys.version[:3]")
-PYPREFIX=$(shell python -c "import sys; print sys.prefix")
-LINKFORSHARED=$(shell python -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LINKFORSHARED')")
+PYVERSION=$(shell python -c "import sys; print(sys.version[:3])")
+PYPREFIX=$(shell python -c "import sys; print(sys.prefix)")
+LINKFORSHARED=$(shell python -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LINKFORSHARED'))")
 INCLUDES=-I$(PYPREFIX)/include/python$(PYVERSION)
 
 embedded: embedded.o
-       gcc -o $@ $^ $(LINKFORSHARED) -lpython$(PYVERSION) -lm -lpthread -ldl -lutil
+       gcc -o $@ $^ $(LINKFORSHARED) -lpython$(PYVERSION) -lm -lpthread -ldl -lutil -L$(PYPREFIX)/lib
 
 embedded.o: embedded.c
        gcc -c $^ $(INCLUDES)