[Distutils] how to fine tune parameters for extension building

M.-A. Lemburg mal@lemburg.com
Thu Feb 1 17:03:43 2001


Stefan Seefeld wrote:
> 
> Hi there,
> 
> I'm working on the 'synopsis' project, a source code inspection tool
> mainly developed in python, but with a number of extensions in C++.
> (http://Synopsis.sourceforge.net)
> 
> I'm considering trying out the distutils, but I'm stumbling about
> a couple of (minor) issues. I don't seem to be able to specify compiler
> names and options, only the options as provided by the Extension dictionary
> itself. As I would replace all the Makefiles, I'd of course need the
> same degree of flexibility in choosing the tools I need, for example
> calling lex/bison, or whatever.
> 
> May be distutils is currently not up to the task to replace make,
> in which case I would just stay with the current build system I have.
> 
> Any help is highly appreciated !

You could write new commands and hook them into the build chain
in order to run other currently unsupported tools like flex/yacc.

Check out the autoconf example in the mxDateTime setup.py file
provided in distutils. This shows how to add new commands and
how to link them into the processing chain.

Alternatively, take a look at this package ...

      http://www.lemburg.com/python/mx-Extensions-BASE-1.0.0.zip

... which does some of these things.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Company:                                        http://www.egenix.com/
Consulting:                                    http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/