In OpenGL/__init__.py you find out the current version
by doing:
filename = os.path.join(os.path.dirname(__file__),
'version')
__version__ = string.strip(open(filename).read())
However, once things are packed up by py2exe,
__init__.py is actually inside a zipfile, and there is
no "version" file for it to read.
The easiest fix that I've found is to just wrap the
above in a try/except block, and use whatever the
current version should be.
For example
try:
filename =
os.path.join(os.path.dirname(__file__), 'version')
__version__ = string.strip(open(filename).read())
except OSError:
__version__ = '2.0.2.01'
Even if you did something that indicated an "unknown"
version, or something else, it would be nice to have
pyOpenGL work out of the box when packed up.
Thanks,
John
Logged In: YES
user_id=727687
I have the very same problem. Can we get a fix for this bug?
Logged In: YES
user_id=727687
Originator: NO
I'll notice that PyInstaller has a stable workaround for this bug, so it can be used with stock PyOpenGL.