summaryrefslogtreecommitdiff
path: root/tests/build/build_ext_cython_c_in_temp.srctree
blob: bbc89a3dead7504a00f559afec63d8de525fb035 (plain)
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

PYTHON setup.py build_ext --inplace --cython-c-in-temp
PYTHON -c 'import mymodule; assert mymodule.test_string == "TEST"'
PYTHON check_paths.py

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

from Cython.Distutils.extension import Extension
from Cython.Build import build_ext
from distutils.core import setup

setup(
    name='Hello world app',
    ext_modules = [
        Extension(
            name = 'mymodule',
            sources=['mymodule.pyx'],
        )
    ],
    cmdclass={'build_ext': build_ext},
)

######## mymodule.pyx ########

test_string = "TEST"

######## check_paths.py ########

import os
assert not os.path.exists("mymodule.c")