Fix issues with python architecture-specific include path
python*/pyconfig.h
is an architecture-specific header and is placed
in /usr/include/{arch}-linux-{abi}
. Python itself did not know where
to find this header. So python packages with modules written in C
would not be able to compile correctly.
Python already has some support with separate exec_prefix
. We use it
to add support for arbitrary architecture-specific include path.
There are four ways to discover include paths for python, all of which were fixed:
- python3-config
- pkg-config
- sysconfig
- distutils
libxml2 has a peculiar way to search for python include path using a
private function from distutils. It does not support separate
exec_prefix
. So it does not support separate architecture-specific
include path. This one had to be worked around.