Re: [PyOpenGL-Users] py2exe and pyopengl?
Brought to you by:
mcfletch
From: Dan H. <Dan...@no...> - 2010-02-16 18:28:10
|
Jef Mangelschots wrote: > please check out my previous posting called "HOWTO freeze PyOpenGL > programs with py2exe": > http://sourceforge.net/mailarchive/message.php?msg_name=eb8474fe0911100101u9dd7d24ibd1c56f2b2c1599e%40mail.gmail.com > hope this helps. One further variation of Jef's instructions: You can programmatically copy the OpenGL directory to "dist" via your setup.py so that you don't have to copy it manually each time. Here's an example using shutil.copytree(): # Since the ignore keyword was introduced in Python 2.6, include a # fall-back for Python 2.5. try: shutil.copytree( opengl_dir, os.path.join( "dist", "OpenGL" ), ignore = shutil.ignore_patterns( "*.py", "*.pyc", "GLUT", "Tk" ), ) except TypeError: shutil.copytree( opengl_dir, os.path.join( "dist", "OpenGL" ) ) This is from: http://bitbucket.org/dhelfman/maproom/src/tip/setup.py#cl-190 I didn't say it was pretty. :) Dan |