Commit 9d401682 authored by Robert Bradshaw's avatar Robert Bradshaw

Add build_dir test.

parent 1bfd57ef
PYTHON setup.py build_ext --inplace
PYTHON -c "import a"
ls -R
if [ -f "a.c" ]; then
echo "C output in local directory."
exit 1
fi
if [ ! -f "scratch/a.c" ]; then
echo "Missing C output in scratch."
exit 1
fi
######## setup.py ########
# TODO: Better interface...
from Cython.Build.Dependencies import cythonize
from distutils.core import setup
setup(
ext_modules = cythonize("*.pyx", build_dir="scratch"),
)
######## a.pyx ########
cdef extern from "a_helper.h":
int value
assert value == 100
######## a_helper.h ########
int value = 100;
\ No newline at end of file
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