-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
36 lines (30 loc) · 1.17 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import sys
from cx_Freeze import setup, Executable
# Chemin vers l'icône
icon_path = "icon.png"
# Nom de votre fichier exécutable
exe_name = "play Tetris"
# Paramètres de configuration de Cx_Freeze
build_exe_options = {
"packages": ["pygame"],
"excludes": [
'PyQt6', 'scipy', 'numpy', 'jupyter', 'altgraph', 'asyncio', \
'cffi', 'concurrent', 'ctypes', 'distutils', 'email', 'html', \
'http', 'jinja2', 'json', 'lib2to3', 'logging', 'markupsafe', \
'multiprocessing', 'ordlookup', 'packaging', 'pkg_resources', \
'pycparser', 'pydoc_data', 'PyInstaller', 'pyparsing', 'pywin32_system32', \
'setuptools', 'tcl8', 'test', 'tk8.6', 'tkinter', 'unittest', \
'urillib', 'win32com', 'win32ctypes', 'xml', 'xmlrpc', 'zipp'
],
"include_files": [icon_path, 'mario_font.ttf']
}
# Création de l'exécutable
base = None
if sys.platform == "win32":
base = "Win32GUI"
exe = Executable(script="main.py", base=base, target_name=exe_name, icon=icon_path)
setup(name="Tetris on windows",
version="1.0",
description="Tetris build with Pygame",
options={"build_exe": build_exe_options},
executables=[exe])