[Distutils] Compiling / Installing extensions

Greg Ward gward@python.net
Mon, 7 Feb 2000 20:33:19 -0500


On 07 February 2000, Robin Becker said:
> In my view it is wrong for the compiler specific stuff to be anywhere
> other than the specific compiler file, but there you go.

It's a tradeoff between kludging the Python-extension-specific,
platform-neutral code or kludging the Python-extension-ignorant,
platform-specific code.  I prefer the former, because
Python-extension-specific code has fewer applications outside of the
Distutils.  The application-neutral, platform-specific code
(MSVCCompiler and UnixCCompiler) could be more broadly applicable, so
I'm trying to keep it "pure".

> so in build_ext.py line 225 should look like
> 
>             if self.compiler.compiler_type == 'msvc':
>                 extra_args.append('/export:init%s'%extension_name)

OK, except you mean line 238 in the current CVS version.  ;-) At any
rate, done.  Any Windows people who feel a deep attachment for .def
files better speak up now.  More seriously, is there any reason a Python
extension module needs to export any symbols other than
   "init%s" % extension_name
???

> What's the point of all the definitions in msvccompiler if they aren't
> used? 

Hey, I said it was crufty code.  But now that I look at it, I only see
one class attribute ('_exe_ext') that's not used.  That's not too
bothersome.  So what *are* you referring to?

        Greg
-- 
Greg Ward - all-purpose geek                            gward@python.net
http://starship.python.net/~gward/
Cheops' Law: Nothing *ever* gets built on schedule or within budget.