Re: [xml] Re: libxml2-2.6.11 -- detection of Python in configure



Daniel schrieb:

On Wed, Aug 04, 2004 at 03:40:14PM +0200, Gerrit P. Haase wrote:
Tres wrote:

I don't know the answer to that question, but in general it would be
optimal to ask the Python in question wheere its include files were,
rather than trying to guess the location.  The apposite function is
'distutils.sysconfig.get_python_inc':

   def get_python_inc(plat_specific=0, prefix=None):
       """Return the directory containing installed Python header files.

       If 'plat_specific' is false (the default), this is the path to the
       non-platform-specific header files, i.e. Python.h and so on;
       otherwise, this is the path to platform-specific header files
       (namely pyconfig.h).

       If 'prefix' is supplied, use it instead of sys.prefix or
       sys.exec_prefix -- i.e., ignore 'plat_specific'.
       """

Would be great to add s.th. like this also for the python library. It is
needed to add it to the libxml2mod_la_LIBADD flag for systems where it
is needed to specify the python library when linking this module
(no-undefined symbols allowed on Windows).  Therefore on Cygwin the
libxml2 python module build always fails because of undefined
references because the auto configury doesn't add the needed libpython
to the libxml2mod_la_LIBADD flag.

  I take portability patches, but knowing I can only test them on Linux
be careful !

Alright, I just finished the build of the latest release, the attached
patch is just a workaround for Cygwin which works today, if python
changes the API/ABI and bumps the version to 2.4 then it won't work
anymore, so the approach to solve this globally (detect Python for all
platforms, including header location and library location as suggested
by Tres) and then add the needed flags for platforms which need them
would be a better solution. 

The patch  file is against the 2.9.11 release, but should apply against
the current CVS too.


-- 
=^..^=

Attachment: libxml2-2.6.11-1.patch
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]