from setuptools import setup, Extension
from Cython.Distutils import build_ext
pysmall = Extension('pysmall', sources=['pysmall.pyx', 'small.cpp'],
    include_dirs=['include/'])
setup(name='mypackage', packages=['yourpurepythonpackage'],
    install_requires=['cython==0.17'], ext_modules=[pysmall], cmdclass={
    'build_ext': build_ext})
Distributing a shared library and some C code with a Cython extension module