[Distutils] People want CPAN
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun Nov 15 07:24:52 CET 2009
Tarek Ziadé wrote:
> And have the community create new ExtensionBuilder subclasses that
> could be registered like command.
I don't see a need for registering anything. You should
just be able to explicitly say what tool to use for each
stage of the process.
I envisage something like this:
from distutils import Extension, CCompile
from pyrex.distutils import PyrexCompile
foo_ext = Extension("foo",
CCompile(
PyrexCompile("foo.pyx"),
"somelib.c"))
Here Extension, CCompile and PyrexCompile are constructors
for dependency graph nodes. Their responsibilities are:
Extension -- takes compiled object files and libraries
and links them into a Python extension.
CCompile -- takes C source files and turns them into
object files.
PyrexCompile -- takes Pyrex source files and turns
them into C source files.
They would of course also take other relevant arguments
such as compiler flags, search paths, etc.
--
Greg
More information about the Distutils-SIG
mailing list