from distutils.core import setup, Extension
setup(name='your_python_library', version='1.0', ext_modules=[Extension(
    'your_c_extension', ['your_c_extension.c'])])
Best way to package a Python library that includes a C shared library?