Skip to content

Instantly share code, notes, and snippets.

@rodnaxel
Created April 3, 2017 07:37
Show Gist options
  • Save rodnaxel/e708a13b6a4650f1928b36026e115355 to your computer and use it in GitHub Desktop.
Save rodnaxel/e708a13b6a4650f1928b36026e115355 to your computer and use it in GitHub Desktop.
Example setup.py for cx_freeze
from cx_Freeze import setup, Executable
import sys
import os
os.environ['TCL_LIBRARY'] = r'C:\Python36\tcl\tcl8.6'
os.environ['TK_LIBRARY'] = r'C:\Python36\tcl\tk8.6'
#includes = []
include_files = [r"C:\Python36\DLLs\tcl86t.dll", \
r"C:\Python36\DLLs\tk86t.dll"]
build_exe_options = {"includes": ["tkinter"], "include_files": include_files}
with open('version', 'w') as f:
f.write('1.0.3')
exe = Executable(
script="userial150.pyw",
base="Win32GUI",
targetName="userial150.exe"
)
setup(
name="userial150.exe",
version="0.2.5",
author="Aleksandr Smirnov",
description="Copyright 2016 by Navi-Dals",
options = {"build_exe": build_exe_options},
executables=[exe]
)
@mickyfazler
Copy link

mickyfazler commented Oct 24, 2020

Amazing.Did you tell me how can I automatically run ""userial150.exe" after installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment