setup.py for an extension

Paulo da Silva p_s_d_a_s_i_l_v_a at netcabo.pt
Wed Mar 21 00:09:14 EDT 2012


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/<user>/ECLIPSE/workspace/ext/src

foo.h+foo.c are to be compiled into _foo.so shared lib. _foo.so is
itself a module only called from foo.py.

The dir I wrote the setup.py is any arbitrary dir. I don't want to put
packaging stuff into the eclipse source.

I read the docs but have no idea on how to do this. Some tentatives I
did completely failed.

Any help?

Thanks in advance.



More information about the Python-list mailing list