Page History
...
Instead of passing a library name as a string, pass a tuple with the sources to compile:
Code Block |
---|
# setup.py
#__________
import sys
from distutils.core import setup
from distutils.command.build_clib import build_clib
from distutils.extension import Extension
from Cython.Distutils import build_ext
libhello = ('hello', {'sources': ['hello.c']}) # <<<<==============
ext_modules=[
Extension("demo", ["demo.pyx"])
]
setup(
name = 'demo',
libraries = [libhello],
cmdclass = {'build_clib': build_clib, 'build_ext': build_ext},
ext_modules = ext_modules
) |
...
#__________
|
Using C++ in Cython
Overview
Content Tools