图像

cx_Freeze zip python to exe

这里仅做笔记参考,没有什么可说的。

python setup.py build


#setup.py

import sys
from cx_Freeze import setup, Executable

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

# 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 = "GetUserInfo",
        version = "0.1",
        description = "Get User Information From Wechat!",
        options = {"build_exe": build_exe_options},
        executables = [Executable("getuserinfo.py", base=base)]
        )

发表评论