run embedding test with current Python, not system Python
authorStefan Behnel <scoder@users.berlios.de>
Thu, 11 Mar 2010 11:57:16 +0000 (12:57 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 11 Mar 2010 11:57:16 +0000 (12:57 +0100)
Demos/embed/Makefile

index 5d05c4e2085bb6060afbec88a201566e9bb7b21c..2117e558ccb8c85ab5bdc9f2d6ca4955c82db487 100644 (file)
@@ -1,7 +1,8 @@
 # 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'))")
+PYTHON=python
+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
@@ -11,7 +12,7 @@ embedded.o: embedded.c
        gcc -c $^ $(INCLUDES)
 
 embedded.c: embedded.pyx
-       @python ../../cython.py --embed embedded.pyx
+       @$(PYTHON) ../../cython.py --embed embedded.pyx
 
 all: embedded
 
@@ -21,4 +22,4 @@ clean:
 
 test: clean all
        ./embedded > test.output
-       python assert_equal.py embedded.output test.output
+       $(PYTHON) assert_equal.py embedded.output test.output