GNOME Bugzilla – Bug 499060
pyGTK installed using easy_install is not detected during installation
Last modified: 2011-09-25 16:33:59 UTC
When instaling GTK using easy_install I got this file (or a directory if zip-ing is disabled during install) in site-packages: pygtk-2.10.6-py2.5-win32.egg which looking at the installer script would not be detected because it only looks for the directory gtk-2.0 in site-packages. I know that the trivial solution would just creating the gtk-2.0 directory in python Lib\site-packages, but it would help those installing their pyGTK using easy_install without needing them to peek into the installer script to find the solution if the installer also check for the egg file/directory.
Sorry, first line should be "When installing pyGTK..."
What is the suggested way to check for packages that are installed by easy_install?
One way of doing it: current installer script scans for PythonPath in the windows registry. After doing that, it can invoke a python script that test for the existence of a particular package (in this case pygtk) by calling, for example, pythonw.exe testgtk.py. The contents for testgtk.py could be try: import pygtk except: f = open(os.environ['TMPDIR'] + 'no_pygtk', 'w') f.close() then the installer script would only need to check for the existence of %TMPDIR%/no_pygtk.
*** Bug 579726 has been marked as a duplicate of this bug. ***
Revised installer (for 2.7 and future versions) will include everything needed to run Python scripts (this means Python and PyGTK+), so this bug isn't relevant anymore.