cythonize_glob.srctree 675 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
PYTHON setup.py build_ext --inplace
PYTHON -c "import runner"

######## setup.py ########

from Cython.Build.Dependencies import cythonize

from distutils.core import setup

setup(
  ext_modules = cythonize("**/a*.pyx", include_path=['subdir'], compiler_directives={'cdivision': True}),
)

######## a.pyx ########

######## p1/__init__.py ########

######## p1/a.pyx ########

######## p1/ab.pyx ########

######## p1/b.pyx ########

######## p1/p2/__init__.py ########

######## p1/p2/a.pyx ########

######## runner.py ########

import a
import p1.a
import p1.ab
import p1.p2.a
try:
    import p1.b
    assert False, "b should not be complied"
except ImportError:
    pass