Commit ac5bf544 authored by Robert Bradshaw's avatar Robert Bradshaw

Test for --embedded mode.

parent 3a2a66e2
# Makefile for creating our standalone Cython program
PYVERSION=2.3
PYPREFIX=/usr
PYVERSION=$(shell python -c "import sys; print sys.version[:3]")
PYPREFIX=$(shell python -c "import sys; print sys.prefix")
INCLUDES=-I$(PYPREFIX)/include/python$(PYVERSION)
embedded: embedded.o
gcc -o $@ $^ -lpython$(PYVERSION)
gcc -o $@ $^ -lpython$(PYVERSION)
embedded.o: embedded.c
gcc -c $^ $(INCLUDES)
gcc -c $^ $(INCLUDES)
embedded.c: embedded.pyx
@python ../../cython.py --embed embedded.pyx
@python ../../cython.py --embed embedded.pyx
all: embedded
clean:
@echo Cleaning Demos/embed
@rm -f *~ *.o *.so core core.* *.c embedded
test: clean all
./embedded > test.output
python assert_equal.py embedded.output test.output
import sys
if open(sys.argv[1]).read() != open(sys.argv[2]).read():
print "Files differ"
sys.exit(1)
else:
print "Files identical"
__main__
Hi, I'm embedded.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment