views:

76

answers:

1

I wrote a small Python extension that bundles, compiles and statically links with a small C library with one optional .S (assembler) file. Distutils's Extension() doesn't recognize the .S by default. Is there a good way to compile that file, or should I just shell out to make? Right now I compile the C code only for a slightly slower library.

+1  A: 

As distributed, distutils don't know about assembly code, and I don't know of extensions to it that let it deal automatically with it. In a similar situation I've always built the library separately (with C and assembly as needed and feasible) and only used the resulting .a with setup.py.

Alex Martelli