Some Python packages install a .pth file in $out/lib/python/site-packages. These must be processed to enable Python to find certain Python modules.

For instance, wxPython installs a file $out/lib/python2.7/site-packages/wx.pth with contents “wx-2.8-gtk2-unicode”, indicating that the subdirectory “wx-2.8-gtk2-unicode” should be added to Python’s module search path. This allows “import wx.bla” to be resolved to $out/lib/python2.7/site-packages/wx-2.8-gtk2-unicode/wx/bla.py. However, Python only processes *.pth files in specific hard-coded locations (see http://docs.python.org/library/site.html), so this doesn’t work.

Submitted by Eelco Dolstra on 3 May 2011 at 18:30

Log in to post comments