Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Freezing code to .exe
#2
It looks like you can exclude certain packages or include specific ones, but it says it auto-detects what's needed.  ...it's possible pygame needs a lot, though.
http://cx-freeze.readthedocs.io/en/lates...utils.html Wrote:
import sys
from cx_Freeze import setup, Executable

# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os"], "excludes": ["tkinter"]}

# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
    base = "Win32GUI"

setup(  name = "guifoo",
        version = "0.1",
        description = "My GUI application!",
        options = {"build_exe": build_exe_options},
        executables = [Executable("guifoo.py", base=base)])
I don't know enough about it to know why the version/filename aren't being honored.
Reply


Messages In This Thread
Freezing code to .exe - by LavaCreeperKing - Nov-16-2016, 09:57 PM
RE: Freezing code to .exe - by nilamo - Nov-16-2016, 10:38 PM
RE: Freezing code to .exe - by metulburr - Nov-16-2016, 10:56 PM
RE: Freezing code to .exe - by LavaCreeperKing - Nov-17-2016, 09:53 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  While Loop Variable Freezing? stylingpat 13 6,651 Feb-25-2021, 10:42 AM
Last Post: Abdullah

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020