[ pyopengl-Bugs-2130003 ] Loading GLUT on DarwinPlatform failes

"SourceForge.net" <[email protected]> Fri, 26 Sep 2008 11:19:50 +0000
Newsgroups gmane.comp.python.opengl.devel
Message-ID <[email protected]>
Bugs item #2130003, was opened at 2008-09-26 11:19
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2130003&group_id=5988

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: GLUT
Group: v3.0.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Loading GLUT on DarwinPlatform failes

Initial Comment:
If the file system was formatted as case sensitive (Leopard offers this option at install time), the following code will fail:

from OpenGL.GLU import *

with

>>> from OpenGL.GLU import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "OpenGL/GLU/__init__.py", line 2, in <module>
    from OpenGL import platform
  File "OpenGL/platform/__init__.py", line 36, in <module>
    _load()
  File "OpenGL/platform/__init__.py", line 27, in _load
    plugin_class = plugin.load()
  File "OpenGL/plugins.py", line 14, in load
    return importByName( self.import_path )
  File "OpenGL/plugins.py", line 28, in importByName
    module = __import__( ".".join(moduleName), {}, {}, moduleName)
  File "OpenGL/platform/darwin.py", line 27, in <module>
    class DarwinPlatform( baseplatform.BasePlatform ):
  File "OpenGL/platform/darwin.py", line 47, in DarwinPlatform
    mode=ctypes.RTLD_GLOBAL 
  File "OpenGL/platform/ctypesloader.py", line 42, in loadLibrary
    return dllType( name, mode )
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ctypes/__init__.py", line 325, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: ('dlopen(glut, 10): image not found', 'glut', None)
>>> 

Proposed fix:

in OpenGL/platform/darwin.py

change line 46 from:
      'glut',
to
      'GLUT',

this will solve the problem.

ikokai <at> gmail <dot> com 





----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2130003&group_id=5988

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net