Tricky question about native extension packaging

olivierbourdon38 at gmail.com olivierbourdon38 at gmail.com
Tue Feb 10 17:42:04 CET 2009


let's assume I (almost) have and extension available as a C file and
the setup.py and I want to generate from this single c file 2 .so
files using

cc -DOPTION1 x.c to produce x_1.so
cc -DOPTION2 x.c to produce x_2.so

and at runtime depending of my OS version either load x_1 or x_2

any (easy) way to do that and deliver the result as a single .egg
file ? What should the setup.py look like ?

Thanks for any insight




More information about the Python-list mailing list