[Pythonmac-SIG] bundlebuilder and pyopengl

Bob Ippolito bob at redivi.com
Wed May 5 19:36:56 EDT 2004


On May 4, 2004, at 11:35 AM, Mark DePristo wrote:

> Hi everyone,
>
> I'm having a tough time getting bundlebuilder to work with PyOpenGL.   
> I keep getting the following message in my console.log box:
>
> ===== Tue May 04 2004 ===== 16:23:07 Europe/London =====
> Traceback (most recent call last):
>   File  
> "/Users/mdepristo/research/chemotaxis/glutSoloXcode/pybct/build/ 
> pyBCT.app/Contents/Resources/test.py", line 1, in ?
>     import OpenGL
>   File  
> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/site-packages/OpenGL/__init__.py", line 18, in ?
>   File  
> "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ 
> python2.3/site-packages/OpenGL/__init__.py", line 14, in  
> __set_attributes
> IOError: [Errno 20] Not a directory:  
> '/Users/mdepristo/research/chemotaxis/glutSoloXcode/pybct/build/ 
> pyBCT.app/Contents/Resources/Modules.zip/OpenGL/version'

PyOpenGL "depends" on a stupid little file so that it knows its own  
version, I suggest that you just change __init__.py so that it doesn't  
try and read that file.  Change this:

     filename = os.path.join(os.path.dirname(__file__), 'version')
     __version__ = string.strip(open(filename).read())

To this:

     __version__ = '2.0.1.07'

There are other ways to do it, but none of them are great and all of  
them are more of a pain in the ass than this.

-bob




More information about the Pythonmac-SIG mailing list