[gobolinux-users] $pythonpath
Carlo Calica
carlo at calica.com
Wed Nov 28 09:26:08 NZDT 2007
On 11/14/07, Giambattista Bloisi <giamby at infinito.it> wrote:
>
> My problem was yet another I wanted python to scan for pth file that were in
> /System/Links/Libraries/python2.5/site-packages/ because some python modules (PyGObject)
> installed there .pth files in the hope they were actually scanned.
> I found that I could scan additional path for pth files by adding a line of the
> following form to gobolinux.pth:
> import site; site.addsitedir('/System/Links/Libraries/python2.5/site-packages/', set())
>
> This should be ok with docs and future versions of python as site doc says that lines
> starting with "import " are actually executed.
>
> I think that this could be a final solution for gobolinux distro. In this way when you have
> to add a dir in the search path all you have to do in the recipe is to add a .pth file in
> the appropriate Resources subdir. It is then symlinked to
> /System/Links/Libraries/python<major.minor>/site-packages/ and it works as we registered this path for pth file scanning.
>
I've had time problem countless times. I usually brute force it by
adding a symlink in /Programs/Python/.../.../ but this is much better.
Could this be added to the Python recipe?
add to gobolinux.pth
import site; site.addsitedir('/System/Links/Libraries/python2.5/site-packages/',
set())
Anyone see any problems doing this?
--
Carlo J. Calica
More information about the gobolinux-users
mailing list