cx_freeze构建包含我的计算机上安装的所有模块,因此冻结的构建变得非常庞大。如何禁用自动检测功能?我只想构建一个小的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放错了模块。
如何设置我需要的严格模块清单?
眼眸繁星
相关分类