comparison setup.py @ 572:7f113f15300b

Include the Glade file in the main package on install.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 09 Jul 2014 23:44:53 +0200
parents ab0a5580bc40
children f3778145d7e7
comparison
equal deleted inserted replaced
571:e992927f07a8 572:7f113f15300b
135 base = 'Win32GUI' if sys.platform == 'win32' else None 135 base = 'Win32GUI' if sys.platform == 'win32' else None
136 extra = {'options': {'build_exe': {'includes': extension_names + ['glob', 'socket', 'select']}}, 136 extra = {'options': {'build_exe': {'includes': extension_names + ['glob', 'socket', 'select']}},
137 'executables': [Executable(script='scripts/pytouhou', base=base)]} 137 'executables': [Executable(script='scripts/pytouhou', base=base)]}
138 138
139 139
140 # Create a link to the data files (for packaging purposes)
141 current_dir = os.path.dirname(os.path.realpath(__file__))
142 temp_data_dir = os.path.join(current_dir, 'pytouhou', 'data')
143 if not os.path.exists(temp_data_dir):
144 os.symlink(os.path.join(current_dir, 'data'), temp_data_dir)
145
146
140 setup(name='PyTouhou', 147 setup(name='PyTouhou',
141 version='0.1', 148 version='0.1',
142 author='Thibaut Girka', 149 author='Thibaut Girka',
143 author_email='thib@sitedethib.com', 150 author_email='thib@sitedethib.com',
144 url='http://pytouhou.linkmauve.fr/', 151 url='http://pytouhou.linkmauve.fr/',
151 compile_time_env={'MAX_TEXTURES': 128, 158 compile_time_env={'MAX_TEXTURES': 128,
152 'MAX_ELEMENTS': 640 * 4 * 3, 159 'MAX_ELEMENTS': 640 * 4 * 3,
153 'MAX_SOUNDS': 26, 160 'MAX_SOUNDS': 26,
154 'USE_OPENGL': use_opengl}), 161 'USE_OPENGL': use_opengl}),
155 scripts=['scripts/pytouhou'] + (['scripts/anmviewer'] if anmviewer else []), 162 scripts=['scripts/pytouhou'] + (['scripts/anmviewer'] if anmviewer else []),
163 package_data={'pytouhou': ['data/menu.glade']},
156 **extra) 164 **extra)
165
166
167 # Remove the link afterwards
168 if os.path.exists(temp_data_dir):
169 os.unlink(temp_data_dir)