Maintained by: NLnet Labs

[Unbound-users] issue with pythonmodule

Paul Wouters
Tue Aug 9 16:25:43 CEST 2011


On Tue, 9 Aug 2011, Tom Hendrikx wrote:

>> in acx_python.m4 it does this:
>>         #
>>         # Check for site packages
>>         #
>>         AC_MSG_CHECKING([for Python site-packages path])
>>         if test -z "$PYTHON_SITE_PKG"; then
>>                 PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \
>>                         print distutils.sysconfig.get_python_lib(0,0);"`
>>         fi
>>         AC_MSG_RESULT([$PYTHON_SITE_PKG])
>>         AC_SUBST([PYTHON_SITE_PKG])
>>
>> it is very simple.  How could that give the correct path?
>>
>> Best regards,
>>    Wouter
>
> It seems to me that the path that is appended in my patch should be the
> same as the one used in the Makefile. Probably you should update the
> patch when it is clear what the correct path would be, depending on the
> input of Paul.
>
> On my system, the Makefile test returns
> '/usr/lib/python2.7/dist-packages', which works because the distro
> symlinks /usr/lib to /usr/lib64 on 64-bit systems.
>
> Python docs state that distutils.sysconfig.get_python_lib(1,0) would
> return the platform dependant path. I'm curious to see whether this
> includes /usr/lib64 on Paul's system...

import distutils.sysconfig
distutils.sysconfig.get_python_lib(1,0)
'/usr/lib64/python2.7/site-packages'

Paul