[Python-Dev] Change from "config.h" to "pyconfig.h" may be a ticking #include bomb

Mark Favas m.favas@per.dem.csiro.au
Wed, 29 Aug 2001 08:59:29 +0800


Some little while ago, Python 2.2's "configure" started to produce
pyconfig.h rather than config.h (a good thing). "make install" installs
this file into /usr/local/include/python2.2 where it can be used by
extensions, etc. However, any config.h file produced and installed
before the change to pyconfig.h remains in /usr/local/include/python2.2.
I've also been building the XML extension. Only when building this
extension on a brand new Python 2.2 platform did I find that XML's
extension/expat/lib/xmlparse.c #include's <config.h> rather than
<pyconfig.h> (probably not the only extension that does this). Old 2.2
installations found the old config.h file and compiled without error,
although they should have been using pyconfig.h. To pick up this sort of
bug, perhaps "make install" should attempt to remove config.h if it
exists in the target include directory?
 
-- 
Mark Favas  -   m.favas@per.dem.csiro.au
CSIRO, Private Bag No 5, Wembley, Western Australia 6913, AUSTRALIA