[Unbound-users] issue with pythonmodule
tom at whyscream.net
Tue Aug 9 09:42:09 UTC 2011
On 09/08/11 09:45, W.C.A. Wijngaards wrote:
> On 08/09/2011 12:02 AM, Paul Wouters wrote:
>> On Mon, 8 Aug 2011, Tom Hendrikx wrote:
>>> I did some more research on this and I think I found the culprit.
>>> Attached is a patch against unbound 1.4.12 that adds the site-packages
>>> dir to the search path when initialising the python module.
>>> With this patch, things Work For Me (tm) :)
>> I can confirm this fixes the pythonmod loading! Thanks! I've built it
>> for fedora rawhide, and over the next few days should trickly up in all
>> Wouter: Please apply patch to git^Wsvn
> okay. (yes git is fashionable, but svn works, and featureset of git is
> not necessary, this is not the linux kernel, this is the only patch in
> months :-) ). The patch has been committed, thanks Tom!
>> We're still seeing installs in the wrong dir though:
>> [paul at bofh unbound]$ rpm -ql unbound-python
>> That should be /usr/lib64/ not /usr/lib/
> 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);"`
> it is very simple. How could that give the correct path?
> Best regards,
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...
More information about the Unbound-users