setup.py for an extension

Richard Thomas chardster at gmail.com
Wed Mar 21 08:42:19 CET 2012


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"])])



More information about the Python-list mailing list