Debian Codegraph @

tests/compile/verbatiminclude_cimport.srctree

raw
1 PYTHON setup.py build_ext --inplace
2
3 ######## setup.py ########
4
5 from Cython.Build import cythonize
6 from distutils.core import setup
7
8 setup(
9 ext_modules = cythonize("*.pyx"),
10 )
11
12 ######## test.pyx ########
13
14 from moda cimport DEFINE_A
15 from modb cimport DEFINE_B
16
17 ######## moda.pxd ########
18
19 from verbatim cimport DEFINE_ONCE as DEFINE_A
20
21 ######## modb.pxd ########
22
23 from verbatim cimport DEFINE_ONCE as DEFINE_B
24
25 ######## verbatim.pxd ########
26
27 # Check that we include this only once
28 cdef extern from *:
29 """
30 #ifdef DEFINE_ONCE
31 #error "DEFINE_ONCE already defined"
32 #endif
33
34 #define DEFINE_ONCE 1
35 """
36 int DEFINE_ONCE