how to compile multiple files in cython

Newbie to Cython. I am using the following code snippet in a file called to compile another file into Cython (it was suggested by an SO user to me over here):

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

ext_modules = [Extension('func1', ['util/'],)]

    name="Set 1 of Functions",
    cmdclass={'build_ext': build_ext},

I compile it as python build_ext --inplace. This compiles my file at util/ into func1.pyd in the directory of

Suppose I now have two files: util/ and util/ Would it be possible for someone to suggest how to modify the above code snippet to generate func1.pyd and func2.pyd out of them?



The Extension constructor allows you to specify multiple source files, so changing the ext_modules line to this:

ext_modules = [Extension('func1', ['util/', 'util/'],)]

should do the trick.