【发布时间】:2020-10-16 08:21:50
【问题描述】:
当我使用 cx_freeze 冻结我的代码时,我通常在 setup 函数中包含名称、版本和描述关键字参数,因为这是文档示例中所做的。但我无法弄清楚这些关键字参数实际上如何影响安装脚本的输出。如果我忽略或省略这些关键字参数,是否会导致任何问题?以下是参考文档中的示例代码。
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)])
【问题讨论】:
标签: python setuptools cx-freeze distutils