Commit b9aaa805 authored by Bradley M. Froehle's avatar Bradley M. Froehle

Add test for pxd cimports from sys.path.

parent 39b1a034
PYTHON setup.py build_ext --inplace
PYTHON -c "import a"
######## setup.py ########
from Cython.Build import cythonize
from distutils.core import setup
# Add ./site-packages to sys.path
from os.path import realpath
import sys
sys.path.append(realpath('site-packages'))
setup(
ext_modules = cythonize("*.pyx"),
)
######## site-packages/b/__init__.py ########
######## site-packages/b/other.pxd ########
cdef inline foo(int a):
return a**2
######## a.pyx ########
from b.other cimport foo
print foo(10)
cimport b.other
print b.other.foo(10)
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