Torsten Landschoff wrote:

>Hi James, 
>
>Just built Debian packages for pygtk 0.6.11 and 1.99.13. 
>
>On Sun, Aug 18, 2002 at 09:37:16PM +0800, James Henstridge wrote:
>  
>
>>I have just checked in changes to pygtk and gnome-python (both 1.2 and 
>>2.0 branches) to make parallel install easier.
>>
>>Here is a small summary of how it works:
>>
>>1. each major version of pygtk (1.2, 2.0, etc) installs under:
>>      $(prefix)/lib/python?.?/site-packages/gtk-x.y
>>    
>>
>
>This works fine.
>
>  
>
>>2. each version of pygtk installs a file called pygtk.pth into:
>>      $(prefix)/lib/python?.?/site-packages
>>   containing a single line: gtk-x.y
>>    
>>
>
>pygtk 1.99.13 does not seem to do that. pygtk.pth is missing so far.
>No problem currently as I did not want to make the new version the 
>default already. 
>
>  
>
>>3. each version of pygtk installs the file pygtk.py into
>>      $(prefix)/lib/python?.?/site-packages
>>   This file is identical for all pygtk versions.
>>    
>>
>
>This file is also only installed from 0.6.11 is seems.
>
That is weird.  I use exactly the same code in the Makefile.am's of the 
different versions.

>
>  
>
>>Addon packages install into the appropriate gtk-x.y directory.
>>
>>Results are:
>>[...]
>>c. Programs can request a particular major version of pygtk with:
>>      import pygtk ; pygtk.require('x.y')
>>   If they want a particular version, this can be followed with an
>>   assert:
>>      import pygtk ; pygtk.require('2.0')
>>      import gtk
>>      assert gtk.pygtk_version >= (1,99,12), 'pygtk version too old'
>>    
>>
>
>Sorry, but I can't see how this can work if pygtk.pth only includes
>the default version. With that setup only a single installation of
>pygtk will be in sys.path. But pygtk.py seems to look into just that
>variable to find out the available versions of pygtk. 
>
>Perhaps you just meant to say that all versions should be in pygtk.pth
>with the default version first?
>  
>
The .pth file is used to select a default version of pygtk.

For apps that want to make sure they get a particular version, they use 
the pygtk.py module.  This module removes the default pygtk platform 
from sys.path and adds the desired version (or raises an exception if 
the requested version is not found).

James.

-- 
Email: [EMAIL PROTECTED]              | Linux.conf.au   http://linux.conf.au/
WWW:   http://www.daa.com.au/~james/ | Jan 22-25   Perth, Western Australia. 




_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to