comparison setup.py @ 522:e8496e5ba056

Add a compilation option to disable anmviewer.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 18 Dec 2013 17:53:16 +0100
parents 53129f3a54af
children 43ecf0f98f4d
comparison
equal deleted inserted replaced
521:53129f3a54af 522:e8496e5ba056
22 packages = [] 22 packages = []
23 extension_names = [] 23 extension_names = []
24 extensions = [] 24 extensions = []
25 25
26 debug = False # True to generate HTML annotations and display infered types. 26 debug = False # True to generate HTML annotations and display infered types.
27 anmviewer = False # It’s currently broken anyway.
27 28
28 29
29 # Check for gl.pc, and don’t compile the OpenGL backend if it isn’t present. 30 # Check for gl.pc, and don’t compile the OpenGL backend if it isn’t present.
30 try: 31 try:
31 check_output([COMMAND] + GL_LIBRARIES) 32 check_output([COMMAND] + GL_LIBRARIES)
86 extension_names.append(extension_name) 87 extension_names.append(extension_name)
87 if extension_name == 'pytouhou.lib.sdl': 88 if extension_name == 'pytouhou.lib.sdl':
88 compile_args = sdl_args 89 compile_args = sdl_args
89 elif extension_name == 'pytouhou.ui.window' and use_opengl: 90 elif extension_name == 'pytouhou.ui.window' and use_opengl:
90 compile_args = opengl_args 91 compile_args = opengl_args
92 elif extension_name == 'pytouhou.ui.anmrenderer' and not anmviewer:
93 continue
91 else: 94 else:
92 compile_args = package_args 95 compile_args = package_args
93 extensions.append(Extension(extension_name, 96 extensions.append(Extension(extension_name,
94 [os.path.join(directory, filename)], 97 [os.path.join(directory, filename)],
95 **compile_args)) 98 **compile_args))
121 compile_time_env={'MAX_TEXTURES': 128, 124 compile_time_env={'MAX_TEXTURES': 128,
122 'MAX_ELEMENTS': 640 * 4 * 3, 125 'MAX_ELEMENTS': 640 * 4 * 3,
123 'MAX_CHANNELS': 26, 126 'MAX_CHANNELS': 26,
124 'USE_OPENGL': use_opengl, 127 'USE_OPENGL': use_opengl,
125 'USE_GLEW': is_windows}), 128 'USE_GLEW': is_windows}),
126 scripts=['eosd', 'anmviewer'], 129 scripts=['eosd'] + (['anmviewer'] if anmviewer else []),
127 **extra) 130 **extra)