Cython has moved to github.

cython-devel

view tests/build/inline_distutils.srctree @ 4256:b816b03ff502

Make __new__ -> __cinit__ into an error, fix compiler crash.
author Robert Bradshaw <robertwb@math.washington.edu>
date Tue Dec 21 02:09:22 2010 -0800 (3 years ago)
parents b5feecf8ec4b
children
line source
1 PYTHON setup.py build_ext --inplace
2 PYTHON -c "import a"
4 ######## setup.py ########
7 # TODO: Better interface...
8 from Cython.Build.Dependencies import cythonize
10 from distutils.core import setup
12 setup(
13 ext_modules = cythonize("*.pyx", aliases={'MATH_LIBS': ['m']}),
14 )
16 ######## my_lib.pxd ########
18 # distutils: language = c++
19 # distutils: libraries = MATH_LIBS
21 cdef extern from "my_lib_helper.cpp" namespace "A":
22 int x
24 ######## my_lib_helper.cpp #######
26 namespace A {
27 int x = 100;
28 };
30 ######## a.pyx ########
32 from my_lib cimport x
34 print x