-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcx_setup.py
More file actions
87 lines (76 loc) · 2.11 KB
/
cx_setup.py
File metadata and controls
87 lines (76 loc) · 2.11 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
from cx_Freeze import setup, Executable
import platform
import pytest
import dcc_qc
includes = ['pkg_resources'] + pytest.freeze_includes()
def create_msi_tablename(python_name, fullname):
shortname = python_name[:6].replace("_", "").upper()
longname = fullname
return "{}|{}".format(shortname, longname)
EXECUTABLE_NAME = "qcpkg"
directory_table = [
(
"ProgramMenuFolder", # Directory
"TARGETDIR", # Directory_parent
"PMenu|Programs", # DefaultDir
),
(
"PMenu", # Directory
"ProgramMenuFolder", # Directory_parent
create_msi_tablename(dcc_qc.__title__, dcc_qc.FULL_TITLE)
),
]
shortcut_table = [
(
"startmenuShortcutDoc", # Shortcut
"PMenu", # Directory_
"{} Documentation".format(create_msi_tablename(dcc_qc.__title__, dcc_qc.FULL_TITLE)),
"TARGETDIR", # Component_
"[TARGETDIR]documentation.url", # Target
None, # Arguments
None, # Description
None, # Hotkey
None, # Icon
None, # IconIndex
None, # ShowCmd
'TARGETDIR' # WkDir
),
]
INCLUDE_FILES = [
"documentation.url"
]
setup(
name=dcc_qc.__title__,
version=dcc_qc.__version__,
packages=[
'dcc_qc',
'dcc_qc.packages',
'dcc_qc.task_states',
'dcc_qc.checkers',
'dcc_qc.profiles',
'dcc_qc.reports',
'dcc_qc.validator',
'tests'
],
url=dcc_qc.__url__,
description=dcc_qc.__description__,
executables={
Executable("dcc_qc/cli.py",
targetName=("{}.exe".format(EXECUTABLE_NAME) if platform.system() == "Windows" else EXECUTABLE_NAME))
},
options={
"build_exe": {
'includes': includes,
"include_msvcr": True,
"include_files": INCLUDE_FILES,
"packages":['six', "packaging"],
},
"bdist_msi": {
"upgrade_code": "{2FB4B947-68DA-45EC-956B-6A9B85D1E060}",
"data": {
"Shortcut": shortcut_table,
"Directory": directory_table
}
}
},
)