Mercurial > touhou
comparison setup.py @ 795:2d60a14f4816 default tip
python: Rewrite the main entrypoint in Rust
This lets us progressively replace Python modules with Rust ones.
Currently missing features include:
- Saving replays
- Networking code for cooperative mode
- Reading a configuration file for options
- Maybe more.
But the base game is working, so yay!
| author | Link Mauve <linkmauve@linkmauve.fr> |
|---|---|
| date | Tue, 02 Jun 2026 19:06:16 +0200 |
| parents | 7e940ebeb5fd |
| children |
comparison
equal
deleted
inserted
replaced
| 794:8c2ef2d503c9 | 795:2d60a14f4816 |
|---|---|
| 164 else: | 164 else: |
| 165 base = None | 165 base = None |
| 166 if sys.platform == 'win32': | 166 if sys.platform == 'win32': |
| 167 nthreads = None # It seems Windows can’t compile in parallel. | 167 nthreads = None # It seems Windows can’t compile in parallel. |
| 168 base = 'Win32GUI' | 168 base = 'Win32GUI' |
| 169 extra = {'options': {'build_exe': {'includes': [mod.name for mod in ext_modules] + py_modules}}, | 169 extra = {'options': {'build_exe': {'includes': [mod.name for mod in ext_modules] + py_modules}}} |
| 170 'executables': [Executable(script='scripts/pytouhou', base=base)]} | |
| 171 | 170 |
| 172 | 171 |
| 173 # Create a link to the data files (for packaging purposes) | 172 # Create a link to the data files (for packaging purposes) |
| 174 current_dir = os.path.dirname(os.path.realpath(__file__)) | 173 current_dir = os.path.dirname(os.path.realpath(__file__)) |
| 175 temp_data_dir = os.path.join(current_dir, 'pytouhou', 'data') | 174 temp_data_dir = os.path.join(current_dir, 'pytouhou', 'data') |
| 191 'profile': debug}, | 190 'profile': debug}, |
| 192 compile_time_env={'MAX_TEXTURES': 128, | 191 compile_time_env={'MAX_TEXTURES': 128, |
| 193 'MAX_ELEMENTS': 640 * 4 * 3, | 192 'MAX_ELEMENTS': 640 * 4 * 3, |
| 194 'MAX_SOUNDS': 26, | 193 'MAX_SOUNDS': 26, |
| 195 'USE_OPENGL': use_opengl}), | 194 'USE_OPENGL': use_opengl}), |
| 196 scripts=['scripts/pytouhou'] + (['scripts/anmviewer'] if anmviewer else []), | 195 scripts=['scripts/anmviewer'] if anmviewer else [], |
| 197 packages=['pytouhou'], | 196 packages=['pytouhou'], |
| 198 **extra) | 197 **extra) |
| 199 | 198 |
| 200 | 199 |
| 201 # Remove the link afterwards | 200 # Remove the link afterwards |
