distutils question

Joachim Dahl joachim at ee.ucla.edu
Wed Sep 7 13:56:40 EDT 2005


I am trying to make a customized install script for an extension module 
using the distutils.ccompiler class.

I want to embed an existing makefile for the C libraries into the Python 
setup script, but I am not sure what's the right way to do it...

E.g., say I want to compile a project as:

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

How would I do that using distutils? It doesn't seem to be possible with
the normal core.setup method, and distutils.ccompiler seems to be the
best option, but I couldn't get it working...

Hopefully someone the list can enlighten me.
Thanks!
Joachim



More information about the Python-list mailing list