forked from Ultimaker/cura-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_linux.py.in
134 lines (121 loc) · 3.92 KB
/
setup_linux.py.in
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
import sys
import os.path
from cx_Freeze import setup, Executable, hooks
def load_scipy(finder, module):
try:
finder.IncludePackage("scipy._lib")
finder.IncludePackage("scipy.misc")
finder.IncludePackage("scipy.sparse.csgraph._validation")
finder.IncludePackage("scipy.sparse._csparsetools")
except Exception as e:
print("setup_linux.py.in: Error in load_scipy: ", e)
hooks.load_scipy = load_scipy
def load_pyqt5_qtgui(finder, module):
finder.IncludeModule("PyQt5.QtCore")
hooks.load_PyQt5_QtGui = load_pyqt5_qtgui
def load_pyqt5_qtquick(finder, module):
finder.IncludeModule("PyQt5.QtCore")
finder.IncludeModule("PyQt5.QtGui")
finder.IncludeModule("PyQt5.QtQml")
finder.IncludeModule("PyQt5.QtNetwork")
finder.IncludeModule("PyQt5._QOpenGLFunctions_2_0")
finder.IncludeModule("PyQt5._QOpenGLFunctions_4_1_Core")
hooks.load_PyQt5_QtQuick = load_pyqt5_qtquick
search_path = sys.path.copy()
search_path.insert(1, "@EXTERNALPROJECT_INSTALL_PREFIX@/lib/python3/dist-packages/")
search_path.insert(2, "@EXTERNALPROJECT_INSTALL_PREFIX@/lib/python3.5/site-packages/")
# Dependencies are automatically detected, but it might need
# fine tuning.
build_options = {
"build_exe": "dist",
"path": search_path,
"packages": [
"xml.etree",
"uuid",
"UM",
"cura",
"zeroconf",
"serial",
"Savitar",
"stl",
"appdirs",
],
"include_files": [
("@EXTERNALPROJECT_INSTALL_PREFIX@/bin/CuraEngine", ""),
("@EXTERNALPROJECT_INSTALL_PREFIX@/lib/cura", "plugins"),
("@EXTERNALPROJECT_INSTALL_PREFIX@/lib/uranium", "plugins"),
("@EXTERNALPROJECT_INSTALL_PREFIX@/lib/python3/dist-packages/UM/Qt/qml/UM", "qml/UM"),
("@EXTERNALPROJECT_INSTALL_PREFIX@/share/cura/resources", "resources"),
("@EXTERNALPROJECT_INSTALL_PREFIX@/share/uranium/resources", "resources"),
("@EXTERNALPROJECT_INSTALL_PREFIX@/lib/plugins", "qt/plugins"),
("@EXTERNALPROJECT_INSTALL_PREFIX@/lib/qml", "qt/qml"),
],
"includes": [
"numpy.core._methods",
"numpy.lib.format",
],
"optimize": 2,
"bin_path_includes": [
"@EXTERNALPROJECT_INSTALL_PREFIX@/lib/",
# "/lib",
# "/lib64",
# "/usr/lib",
# "/usr/lib64",
],
"bin_excludes": [
# "linux-vdso.so.1",
# "libpthread.so.0",
# "libdl.so.2",
# "librt.so.1",
# "libstdc++.so.6",
# "libm.so.6",
# "libgcc_s.so.1",
# "libc.so.6",
# "ld-linux-x86-64.so.2",
# "libz.so.1",
# "libgcc_s.so.1",
# "libglib-2.0",
# "librt.so.1",
# "libcap.so.2",
# "libGL.so.1",
# "libglapi.so.0",
# "libXext.so.6",
# "libXdamage.so.1",
# "libXfixes.so.3",
# "libX11-xcb.so.1",
# "libX11.so.6",
# "libxcb-glx.so.0",
# "libxcb-dri2.so.0",
# "libxcb.so.1",
# "libXxf86vm.so.1",
# "libdrm.so.2",
# "libexpat.so.1",
# "libXau.so.6",
# "libglib-2.0.so.0",
# "libgssapi_krb5.so.",
# "libgthread-2.0.so.0",
# "libk5crypto.so.3",
# "libkeyutils.so.1",
# "libkrb5.so.3",
# "libkrb5support.so.0",
# "libresolv.so.2",
# "libutil.so.1",
# "libXrender.so.1",
# "libcom_err.so.2",
# "libgssapi_krb5.so.2",
]
}
base = "Win32GUI" if sys.platform == "win32" else None
executables = [
Executable(os.path.join("@EXTERNALPROJECT_INSTALL_PREFIX@", "bin", "cura-lulzbot"), base = base)
]
setup(
name = "cura-lulzbot",
version = "@CURA_MAJOR_VERSION@.@CURA_MINOR_VERSION@.@CURA_PATCH_VERSION@",
author = "Aleph Objects",
url="http://www.lulzbot.com/cura",
description = "3D Slicer Software",
license="GNU AFFERO GENERAL PUBLIC LICENSE (AGPL)",
options = { "build_exe": build_options },
executables = executables
)