cx_freeze build 包括安装在我机器上的所有模块,因此冻结的构建变得巨大。如何禁用自动检测功能?我只想构建小型 PyQt 应用程序:
import sys
from cx_Freeze import setup, Executable
path = sys.path + ["app"]
includes = ["app.core", "app.utils"]
excludes = ["tcl"]
build_exe_options = {
"path": path,
"icon": "resources\icons\clock.ico"}
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup( name = "app",
version = "1.1",
description = "My Application",
options = {"build_exe": build_exe_options},
executables = [Executable("app.py", base=base,
targetName="app.exe",
shortcutName="Application",
shortcutDir="DesktopFolder")])
我也有我的自定义模块,每个模块都有一个 utils 子模块,所以 cx_freeze 放错了模块。
如何设置我需要的严格模块列表?