-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsetup.py
57 lines (49 loc) · 2.04 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# A simple setup script to create an executable using PyQt4. This also
# demonstrates the method for creating a Windows executable that does not have
# an associated console.
#
# PyQt4app.py is a very simple type of PyQt4 application
#
# Run the build process by running the command 'python setup.py build'
#
# If everything works well you should find a subdirectory in the build
# subdirectory that contains the files needed to run the application
application_title = "SQLite Inspector" #what you want to application to be called
main_python_file = "sqlite_browser.py" #the name of the python file you use to run the program
application_version = "0.1"
application_description = "SQLite Inspector alls you to view data, execute queries and see entity descriptions"
windows_icon = "sqlinspector.ico"
mac_icon = "sqlinspector.icns"
import sys
import os
from cx_Freeze import setup, Executable
base = None
includes = ["atexit","re"]
if sys.platform == "win32":
base = "Win32GUI"
include_files = [("C:\Python32\Lib\site-packages\PyQt4\plugins\sqldrivers","sqldrivers")]
build_options = {"path": sys.path,
"includes": includes,
"include_files":include_files,
"icon":windows_icon
}
else:
include_files = [("/opt/local/share/qt4/plugins/sqldrivers","sqldrivers")]
build_options = {"path": sys.path,
"includes": includes,
"include_files":include_files
}
if sys.platform == "win32":
setup(
name = application_title,
version = application_version,
description = application_description,
options = {"build_exe" : build_options},
executables = [Executable(main_python_file, base = base)])
else:
setup(
name = application_title,
version = application_version,
description = application_description,
options = {"build_exe" : build_options},
executables = [Executable(main_python_file, base = base, targetName= application_title)])