-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
51 lines (46 loc) · 1.42 KB
/
Copy pathsetup.py
File metadata and controls
51 lines (46 loc) · 1.42 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
import sys
from cx_Freeze import setup, Executable
# Increase recursion limit if necessary
sys.setrecursionlimit(5000)
console_mode = "with"
exe_name = "Test_conection"
# Set the base variable based on the argument
base = None if console_mode == "with" else "Win32GUI"
files = ['Client_Env.py', 'Server_Env.py', 'Manager_server_client.py', 'socket_ui.py', 'ip_utils.py', ('assets', 'assets/')]
# Only the packages actually imported by the project. `selenium` and `bs4`
# were listed here previously but are never imported anywhere in the
# codebase, so they only bloated the frozen build.
packages = [
"eventlet",
"eventlet.hubs.epolls",
"eventlet.hubs.kqueue",
"eventlet.hubs.selects",
"dns",
"socketio",
"manuf",
"engineio",
"scapy",
]
target = Executable(
script="main.py",
base=base,
icon="icon.ico",
targetName=exe_name
)
setup(
name="Test_conection",
version="1.0",
description="Test connection between two computers",
author="Carlos",
options={
"build_exe": {
'include_files': files,
'packages': packages,
'zip_include_packages': packages, # Include packages in a zip file
# Relative to the project directory so the build works on any machine,
# instead of a path hardcoded to one developer's user account.
'build_exe': f'build/{exe_name}',
}
},
executables=[target]
)