[Distutils] making Extensions more flexible
seefeld at sympatico.ca
Thu Aug 28 10:00:22 EDT 2003
M.-A. Lemburg wrote:
>> How can this be enhanced ? I can of course write my own 'build_ext'
>> that is a wrapper around my existing build system, i.e. which
>> calls 'configure', 'make', etc.
> Right, that's how you'd do it. If you come up with a good
> implementation, I'd suggest you post it as patch to SF.
> I can't see why you would want build on build_ext for
> this, though. Writing a new command from scratch using
> the available tools would be much cleaner.
agreed. Though the issue I see with this is that some of the
other commands which I'd still use rely directly or indirectly
on build_ext. For example, the existence of Extension objects
in the distribution object is used to decide where to compile
('pure' or not), and the automatic file list that is generated
for commands such as 'sdist' will inspect the Extensions, too.
So the question is how I can provide my own extension mechanism
in a transparent way, i.e. such that the rest of the framework
will be able to deduce all it has to know to work.
> The code for mx_build_unixlib you find in the mxSetup.py
> module of egenix-mx-experimental is an example of how this
> can be done.
yeah, I had a quick look, before I wrote my own. Again, the
problem I see is not so much with the command itself as with
the way to integrate that.
More information about the Distutils-SIG