-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
63 lines (54 loc) · 1.76 KB
/
setup.py
File metadata and controls
63 lines (54 loc) · 1.76 KB
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
57
58
59
60
61
62
63
"""
A simple setup script to create an executable using PyQt5. This also
demonstrates the method for creating a Windows executable that does not have
an associated console.
PyQt5app.py is a very simple type of PyQt5 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
"""
import sys
from cx_Freeze import setup, Executable
# try:
# from cx_Freeze.hooks import get_qt_plugins_paths
# except ImportError:
# include_files = []
# else:
# # Inclusion of extra plugins (new in cx_Freeze 6.8b2)
# # cx_Freeze imports automatically the following plugins depending of the
# # use of some modules:
# # imageformats - QtGui
# # platforms - QtGui
# # mediaservice - QtMultimedia
# # printsupport - QtPrintSupport
# #
# # So, "platforms" is used here for demonstration purposes.
# include_files = get_qt_plugins_paths("PyQt5", "platforms")
include_files = ['logo.ico','stuff/']
# base="Win32GUI" should be used only for Windows GUI app
base = None
if sys.platform == "win32":
base = "Win32GUI"
build_exe_options = {
"excludes": ["tkinter"],
"include_files": include_files,
}
bdist_mac_options = {
"bundle_name": "Test",
}
bdist_dmg_options = {
"volume_label": "TEST",
}
executables = [Executable("main.py", base=base, target_name="MasterMind",icon="logo.ico")]
setup(
name="MasterMindPQ",
version="1.0",
author ="Rabih ND",
description="A Mastermind game designed with PyQt5 (Qt+Python) ",
options={
"build_exe": build_exe_options,
"bdist_mac": bdist_mac_options,
"bdist_dmg": bdist_dmg_options,
},
executables=executables,
)