0
應該包含我在.py中使用的模塊,如os
模塊在下面的代碼中,或者它自動完成嗎?以及排除是什麼?我在我的.py中使用了pyqt4
是否需要添加它這個setup.py
文件中的名字?Cx_Freeze - 自動包含模塊
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 = "my-app",
version = "0.9.0",
description = "Copyright 2013",
options = {"build_exe": build_exe_options},
executables = [Executable("my_module.py", base=base)])