Assuming you have: lib/__init__.py lib/foo.py lib/foo.c
Then: from distutils.core import setup, Extension setup(name="lib", packages=["lib"], ext_modules=[Extension("lib._foo", ["lib/foo.c"])]) -- http://mail.python.org/mailman/listinfo/python-list
Assuming you have: lib/__init__.py lib/foo.py lib/foo.c
Then: from distutils.core import setup, Extension setup(name="lib", packages=["lib"], ext_modules=[Extension("lib._foo", ["lib/foo.c"])]) -- http://mail.python.org/mailman/listinfo/python-list