Archives April 2, 2014

So close on py2exe with PyOpenGL

I played with getting a py2exe executable created from PyOpenGL today, and it is very close to working.  The basics:

from distutils.core import setup
import py2exe
import glob, os
import OpenGL
data_files = [
    (
        os.path.join('OpenGL','DLLS'),
        glob.glob( os.path.join( os.path.dirname( OpenGL.__file__ ), 'DLLS', '*.*' ))
    ),
]

if __name__ == "__main__":
    setup(
        windows=['shader_test.py'],
        options={
            "py2exe": {
                "includes": [
                    "ctypes", "logging",
                    'OpenGL.platform.win32',
                ] + [
                    'OpenGL.arrays.%s'%x for x in [
                        'ctypesarrays','ctypesparameters','ctypespointers',
                        'lists','nones','numbers','numpymodule','strings','vbo'
                    ]
                ],
                'skip_archive': True,
            },
        },
        data_files = data_files,
    )

Which collects all of PyOpenGL's plugins that are applicable for use in Win32 (basically the ...

Continue reading

Previous day

March 24, 2014

Next day

April 10, 2014

Archives