Make run an external build command

I’d like to package up a Python/C/C++/SWIG project with a script, but from what i have read it looks like distutils expects to run swig, compiler and linker itself, using distutils.core.setup()'s ext_modules arg.

Is there a way to write so that it runs an external command (e.g. ‘cd foo && make all’) when it is asked to build everything?

Thanks for any help,

  • Jules