documentation is incorrect
Brought to you by:
mcfletch
The documentation for py2exe instructions says that you
should stop py2exe from including OpenGL and then
include it manually later. I tried this and had tons of
hassle. Then I simply removed the --excludes=OpenGL
line and my program worked perfectly. I think the
documentation should be modified to reflect the fact
that py2exe now indeed does work fine with OpenGL's
import hooks.
Logged In: YES
user_id=34901
Okay, have added a note to the py2exe page to this effect.
I downloaded PyOpenGL and py2exe this week, used the PyOpenGL documentation[1] to get it working, but it failed. Also Laxori666's tip of not doing anything special didn't work. After a few hours of trying, I found out a workaround for the strange errors that appeared:
- add the current directory to sys.path
- copy the whole PyOpenGL package directory to the dist/ directory, and ship it with the binary
I explained it on the py2exe wiki[2]. I'm not entirely sure if it works on machines where PyOpenGL wasn't installed, but I have good confidence. If not, I'll comment again.
It would be cool if that page was linked to, or the information merged with the PyOpenGL documentation, to save others some clueless hours of trying to get anything working at all. :)
If you want more information on the errors that appeared, I can give you them in a few days.
[1]: http://pyopengl.sourceforge.net/documentation/py2exe.html
[2]: http://www.py2exe.org/index.cgi/PyOpenGL
For the record, I tested it and the generated executable works if PyOpenGL isn't installed.