Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Cython / tests / build / cythonize_additional_sources.srctree
Size: Mime:
PYTHON setup.py build_ext --inplace
PYTHON -c "import a; assert a.test() == 43"

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

from Cython.Build.Dependencies import cythonize

from distutils.core import setup

setup(
  ext_modules = cythonize("*.pyx"),
)

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

# distutils: sources=alib.c

cdef extern from "alib.h":
    int c_function(int x)

def test():
    return c_function(42)


######## alib.c ########

int c_function(int x) {
    return x + 1;
}

######## alib.h ########

int c_function(int x);