~jacksonc/python-packager/devel

« back to all changes in this revision

Viewing changes to Build-Server/pyinstaller/windows-2.6/hooks/hook-OpenGL.py

  • Committer: Jackson Cooper
  • Date: 2010-04-13 03:14:06 UTC
  • Revision ID: jackson@jacksonc.com-20100413031406-415e68ruamsfc5se
Added pyinstaller for Windows

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
## Hook for PyOpenGL 3.x versions from 3.0.0b6 up. Previous versions have a
 
2
## plugin system based on pkg_resources which is problematic to handle correctly
 
3
## under pyinstaller; 2.x versions used to run fine without hooks, so this one
 
4
## shouldn't hurt.
 
5
 
 
6
import os
 
7
import sys
 
8
 
 
9
## PlatformPlugin performs a conditional import based on os.name and
 
10
## sys.platform. pyinstaller misses this so let's add it ourselves...
 
11
 
 
12
if os.name == 'nt':
 
13
    hiddenimports = ['OpenGL.platform.win32']
 
14
else:
 
15
    if sys.platform == 'linux2':
 
16
        hiddenimports = ['OpenGL.platform.glx']
 
17
    elif sys.platform == 'darwin':
 
18
        hiddenimports = ['OpenGL.platform.darwin']
 
19
    else:
 
20
        print 'ERROR: hook-OpenGL: Unrecognised combo (os.name: %s, sys.platform: %s)' % (os.name, sys.platform)
 
21
 
 
22
 
 
23
## arrays modules are needed too
 
24
 
 
25
hiddenimports += ['OpenGL.arrays.ctypesparameters',
 
26
                  'OpenGL.arrays.numarrays',
 
27
                  'OpenGL.arrays._numeric',
 
28
                  'OpenGL.arrays._strings',
 
29
                  'OpenGL.arrays.ctypespointers',
 
30
                  'OpenGL.arrays.lists',
 
31
                  'OpenGL.arrays.numbers',
 
32
                  'OpenGL.arrays.numeric',
 
33
                  'OpenGL.arrays.strings',
 
34
                  'OpenGL.arrays.ctypesarrays',
 
35
                  'OpenGL.arrays.nones',
 
36
                  'OpenGL.arrays.numericnames',
 
37
                  'OpenGL.arrays.numpymodule',
 
38
                  'OpenGL.arrays.vbo',
 
39
                  ]