comparison setup.py @ 525:43ecf0f98f4d

Precalculate the inverse of the texture size at ANM load, to not recalculate at every sprite change.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 18 Dec 2013 18:15:45 +0100
parents e8496e5ba056
children 7c3c90468996
comparison
equal deleted inserted replaced
524:7f016dfbdfb1 525:43ecf0f98f4d
70 70
71 71
72 for directory, _, files in os.walk('pytouhou'): 72 for directory, _, files in os.walk('pytouhou'):
73 package = directory.replace(os.path.sep, '.') 73 package = directory.replace(os.path.sep, '.')
74 packages.append(package) 74 packages.append(package)
75 if package not in ('pytouhou.game', 'pytouhou.lib', 'pytouhou.utils') and not package.startswith('pytouhou.ui'): 75 if package not in ('pytouhou.formats', 'pytouhou.game', 'pytouhou.lib', 'pytouhou.utils') and not package.startswith('pytouhou.ui'):
76 continue 76 continue
77 if package == 'pytouhou.ui' or package == 'pytouhou.ui.sdl': 77 if package == 'pytouhou.ui' or package == 'pytouhou.ui.sdl':
78 package_args = sdl_args 78 package_args = sdl_args
79 elif package == 'pytouhou.ui.opengl': 79 elif package == 'pytouhou.ui.opengl':
80 package_args = opengl_args 80 package_args = opengl_args
88 if extension_name == 'pytouhou.lib.sdl': 88 if extension_name == 'pytouhou.lib.sdl':
89 compile_args = sdl_args 89 compile_args = sdl_args
90 elif extension_name == 'pytouhou.ui.window' and use_opengl: 90 elif extension_name == 'pytouhou.ui.window' and use_opengl:
91 compile_args = opengl_args 91 compile_args = opengl_args
92 elif extension_name == 'pytouhou.ui.anmrenderer' and not anmviewer: 92 elif extension_name == 'pytouhou.ui.anmrenderer' and not anmviewer:
93 continue
94 elif package == 'pytouhou.formats' and extension_name != 'pytouhou.formats.anm0':
93 continue 95 continue
94 else: 96 else:
95 compile_args = package_args 97 compile_args = package_args
96 extensions.append(Extension(extension_name, 98 extensions.append(Extension(extension_name,
97 [os.path.join(directory, filename)], 99 [os.path.join(directory, filename)],