Re: setup.py for an extension

2012-03-21 Thread Richard Thomas
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

setup.py for an extension

2012-03-20 Thread Paulo da Silva
Hi all. I have a python extension (bindings for a C lib - no swig) and I would like to write a setup.py to build a source distribution pack. The extension consists of 3 files: foo.h foo.c foo.py that are placed in a eclipse directory /home//ECLIPSE/workspace/ext/src foo.h+foo.c are to be compile