[Distutils] DEF Files

M.-A. Lemburg mal@lemburg.com
Wed, 15 Sep 1999 10:33:10 +0200


Robert Kern wrote:
> 
> "M.-A. Lemburg" wrote:
> >
> > Anthony Pfrunder wrote:
> > >
> > > On Tue, 14 Sep 1999, Robert Kern wrote:
> > >
> > > > FWIW, I agree with David that requiring modifying the source of an
> > > > extension is not a good thing.  It only adds a headache for people trying to port from *NIX to
> > > > Windows (and we have enough to deal with,
> > > > believe me), and it pollutes the code with weird MS extensions.
> > > ... and weird unix only utilites such as sed [sorry, my Windows side speaking]
> >
> > I don't really get your points here... you can stick all those
> > weird symbols into macros and then forget about them.
> 
> For modules that will be written in the future, yes, we can insist that
> all extensions use a macro like yours.  Python's code uses DL_IMPORT
> to do the same thing.  But since we can generate the DEF files so
> easily, we don't have to require any source code changes for
> already-existing modules.

Ok -- was just a thought.
 
> > [...]
> > BTW, additions to support more compilers are always welcome.
> 
> You can add "|| defined(__MINGW32__)" to the lines with _MSC_VER.

Thanks, Robert. 

BTW, I've looked at the new BeOS port included
in the standard distribution. Anyone know details on what to
use there (it seems to use the same symbols as MSVC).
 
> > The above works for pretty much all Unix, Mac and Windows compilers
> > people have used to compile my extensions, so I guess its pretty
> > generic.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Y2000:                                                   107 days left
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/