[Distutils] distutils questions

Phillip J. Eby pje at telecommunity.com
Thu Sep 8 20:18:38 CEST 2005


At 11:07 AM 9/8/2005 -0700, Joachim Dahl wrote:
>I need the setup script to build the module like this:
>gcc -Ddef1 -c foo.c -o foo_def1.o
>gcc -Ddef2 -c foo.c -o foo_def2.o
>gcc foo_def1.o foo_def2.o -o myext_module.o
>
>Is there currently a (relatively simple) way to include something like
>that into a distutils setup script, or is it easier to keep running a
>separate
>make file to build the different object files before linking?

ZODB does this by making a short 'foo_def1.c' that looks like:

    #define def1
    #include "foo.c"

and repeating.  So, if you don't mind doing that to get your various 
foo_def*.o files, then you're good to go, without a makefile.



More information about the Distutils-SIG mailing list