[Python-checkins] r45894 - python/trunk/Lib/ctypes/test/test_find.py

thomas.heller python-checkins at python.org
Wed May 3 20:35:39 CEST 2006


Author: thomas.heller
Date: Wed May  3 20:35:39 2006
New Revision: 45894

Modified:
   python/trunk/Lib/ctypes/test/test_find.py
Log:
Don't fail the tests when libglut.so or libgle.so cannot be loaded.

Modified: python/trunk/Lib/ctypes/test/test_find.py
==============================================================================
--- python/trunk/Lib/ctypes/test/test_find.py	(original)
+++ python/trunk/Lib/ctypes/test/test_find.py	Wed May  3 20:35:39 2006
@@ -39,9 +39,23 @@
         if lib_glu:
             self.glu = CDLL(lib_glu, RTLD_GLOBAL)
         if lib_glut:
-            self.glut = CDLL(lib_glut)
+            # On some systems, additional libraries seem to be
+            # required, loading glut fails with
+            # "OSError: /usr/lib/libglut.so.3: undefined symbol: XGetExtensionVersion"
+            # I cannot figure out how to repair the test on these
+            # systems (red hat), so we ignore it when the glut or gle
+            # libraries cannot be loaded.  See also:
+            # https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1478253&group_id=5470
+            # http://mail.python.org/pipermail/python-dev/2006-May/064789.html
+            try:
+                self.glut = CDLL(lib_glut)
+            except OSError:
+                pass
         if lib_gle:
-            self.gle = CDLL(lib_gle)
+            try:
+                self.gle = CDLL(lib_gle)
+            except OSError:
+                pass
 
     if lib_gl:
         def test_gl(self):


More information about the Python-checkins mailing list