import setuptools package = setuptools.Extension( name="myextmodule", sources=["myextmodule.c"], ) setuptools.setup(ext_modules=[package])