[Distutils] People want CPAN
ziade.tarek at gmail.com
Sun Nov 15 17:22:56 CET 2009
On Sun, Nov 15, 2009 at 7:24 AM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> 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",
> 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.
The advantage of the registery is that a project can provide a compiler type,
let's say "Pyrex". Then you can use in your own project setup.py this compiler
without explicitely importing something.
But the result is similar, and explicit imports should work too, so
are just sugar on the top of something we first need to make work.
More information about the Distutils-SIG