[Distutils] Compiling / Installing extensions
Mon, 7 Feb 2000 16:33:53 +0100
> In article <049a01bf716a$863ab650$4500a8c0@thomasnotebook>, Thomas
> Heller <firstname.lastname@example.org> writes
> >Only one change neccessary, in sysconfig.py line 150:
> > g['SO'] = '.dll'
> >make this:
> > g['SO'] = '.pyd'
> It's bad to do that here. This is supposed to be for general stuff.
> DLLs are called .dll; python extensions are called .pyd.
> The output extension is supposedly set in msvccompiler, but then
> build_extension doesn't use it.
Yes, you are right of course.
> >The current msvccompiler.py I sent to you
> >adds the /INCREMENTAL:No flag to the linker,
> >which will suppress the .ilk file (used for incremental linking).
> >The generation of .exp and .lib files cannot be suppressed
> >by command line flags.
> >If you want to use msvccompiler.py in a way you described above,
> >we cannot simply delete the .exp and .lib files because they
> >may be needed for dependent modules to be build.
> >Wouldn't it be better to change install_ext to only copy the expected
> >From the MSDN docs [deleted]
I know this stuff (or at least I can read it in my msdn).
The problem is:
The linker generates an .exp and .lib file for every python extension
built. Should msvccompiler.py delete these, or should install_ext
delete them? Or should install_ext only copy the .pyd files
instead of the whole tree?
> We could try and use /Z7 type debugging instead of /Zi
> /Z7 C 7.0- Compatible Produces an .OBJ file and an .EXE file containing
> line numbers and full symbolic debugging information for use with the
> debugger. The symbolic debugging information includes the names and
> types of variables, as well as functions and line numbers.
Is it true that /Zi to the compiler and /pdb:None to the linker
does the same as /Z7 to the compiler? I'm not sure...
> Note that according to the standard we need to do stuff like using the
> _d versions of dll/pyd names for our link.
At least for python15.lib and pyton15_d.lib there is some
magic in config.h, so this is automatic. Works also for /D_DEBUG.
We should drop the line
self.add_library ( "python" + sys.version + sys.version )