-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpackager-setup.py
75 lines (66 loc) · 1.76 KB
/
packager-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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import sys
from cx_Freeze import setup, Executable
# base="Win32GUI" should be used only for Windows GUI app
base = None
if sys.platform == "win32":
base = "Win32GUI"
version = ""
with open("version.txt") as f:
version = f.read().rstrip("\n")
sys.path.insert(0, "src")
shortcut_table = [
("DesktopShortcut", # Shortcut
"DesktopFolder", # Directory_
"Tomography Analysis Tool", # Name
"TARGETDIR", # Component_
"[TARGETDIR]tat.exe", # Target
None, # Arguments
None, # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
'TARGETDIR' # WkDir
)
]
msi_data = {
"Shortcut": shortcut_table
}
bdist_msi_options = {
"summary_data": {
"author": "Hugo Haldi",
"comments": "Tomography Analysis Tool",
"keywords": "TAT Tomography Analysis Tool"
},
"data": msi_data,
"upgrade_code": "{22872b66-f52b-40fd-b973-951a9cac3620}"
}
build_exe_options = {
"packages": [
"PySide6",
"cv2",
"skimage",
"tat"
],
"excludes": [
"tkinter"
],
"path": sys.path
}
executables = [
Executable("src/tat/__main__.py",
copyright="Copyright (C) 2022 TAT",
base=base,
target_name="tat",
shortcut_name="Tomography Analysis Tool")
]
setup(
name="tat",
version=version,
description="Tomography Analysis Tool",
options={
"build_exe": build_exe_options,
"bdist_msi": bdist_msi_options
},
executables=executables
)