-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Añadido el script setup.py para compilar el código usando CX_freeze.
* Lo había subido a la branch equivocada, lo que va a traer problemas luego.
- Loading branch information
1 parent
b32eed2
commit 9d17918
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ __pycache__ | |
/posición de las estrellas.txt | ||
/test.py | ||
/build/ | ||
/setup.py | ||
/data/favicon.ico |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import sys | ||
from cx_Freeze import setup, Executable | ||
import os | ||
from datetime import datetime | ||
|
||
now = ''.join([char for char in str(datetime.now()) if char not in [' ', '.', ':', '-']]) | ||
|
||
build_exe_options = {"packages": ["pygame", "pint"], | ||
"excludes": ["tkinter", "http", "errno", "getop", "gettext", "glob", "http.client", "http.server", | ||
"imp", "io", "lib2to3", "multiprocessing", "zipimport", "xml.parsers", | ||
"pkg_resources", "pydoc", "pprint", "quopri", "runpy", "select", "selectors", | ||
"socket", "stringprep", "subprocess", "tarfile", "unittest", "xml", | ||
"importlib_metadata", | ||
|
||
"pygame.camera", "pygame.joystick", "pygame.mixer", "pygame.music", "pygame.cdrom", | ||
"pygame.examples", "pygame.scrap", "pygame.tests", "pygame.touch", "pygame.midi", | ||
"pygame.sndarray","pygame.surfarray","pygame.pixelcopy" | ||
|
||
], | ||
"include_files": [('data/favicon.png',) * 2], | ||
"optimize": 2, | ||
"build_exe": os.path.join(os.getcwd(), 'build', now) | ||
} | ||
|
||
base = None | ||
if sys.platform == "win32": | ||
base = "Win32GUI" | ||
icono = os.path.join(os.getcwd(), 'data', 'favicon.ico') | ||
setup( | ||
name="Worldbuilding", | ||
version="1.0", | ||
description="An app for worldbuilders", | ||
options={"build_exe": build_exe_options}, | ||
executables=[Executable(script="main.py", base=base, target_name="Worldbuilding", icon=icono)] | ||
) |