-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSEEDPOD Ground Risk.spec
160 lines (152 loc) · 6.04 KB
/
SEEDPOD Ground Risk.spec
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# -*- mode: python ; coding: utf-8 -*-
import os
import sys
import PySide2
import datashader
import distributed
import fiona
import geopandas
import panel
import pyproj
import pyviz_comms
import rasterio
import rtree
import shiboken2
import sklearn
from PyInstaller.building.api import PYZ, EXE, COLLECT
from PyInstaller.building.build_main import Analysis
block_cipher = None
one_dir_mode = True
binaries = []
if sys.platform.startswith('win'):
qt_plugins_path = os.path.join(PySide2.__path__[0], "plugins")
binaries = [
# (os.path.join(sys.base_prefix, "Library", "bin", "spatialindex_c-64.dll"), '.'),
# (os.path.join(sys.base_prefix, "Library", "bin", "mkl_intel_thread.dll"), '.'), # LAPACK etc. routines
(os.path.join(rtree.__path__[0], 'lib'), 'rtree/lib'),
(os.path.join(PySide2.__path__[0], "plugins"), 'PySide2')
]
elif sys.platform.startswith('linux'):
qt_plugins_path = os.path.join(PySide2.__path__[0], "Qt", "plugins", "platforms")
binaries = [
(os.path.join(sys.base_prefix, "lib", "libspatialindex_c.so"), '.'),
# (os.path.join(PySide2.__path__[0], "Qt", "plugins", "platforms"), '.')
]
upx = False # UPX does not play with anything Qt
upx_exclude = [
'PySide2',
'shiboken2',
'qwindows.dll'
]
a = Analysis(['seedpod_ground_risk/main.py'],
binaries=binaries,
datas=[
('static_data/2018-MRDB-minimal.dbf', 'static_data'),
('static_data/2018-MRDB-minimal.prj', 'static_data'),
('static_data/2018-MRDB-minimal.shp', 'static_data'),
('static_data/2018-MRDB-minimal.shx', 'static_data'),
('static_data/DATA_SOURCES.md', 'static_data'),
('static_data/density.csv', 'static_data'),
('static_data/dft_traffic_counts_aadf.csv', 'static_data'),
('static_data/england_wa_2011_clipped.dbf', 'static_data'),
('static_data/england_wa_2011_clipped.prj', 'static_data'),
('static_data/england_wa_2011_clipped.shp', 'static_data'),
('static_data/england_wa_2011_clipped.shx', 'static_data'),
('static_data/nhaps.json', 'static_data'),
('static_data/test_path.json', 'static_data'),
('static_data/tra0307.ods', 'static_data'),
('static_data/aircraft_list.json', 'static_data'),
("seedpod_ground_risk/ui_resources/cascade_splash.png", "ui_resources"),
("seedpod_ground_risk/ui_resources/coord_map.qml", "seedpod_ground_risk/ui_resources"),
("README.md", '.'),
(os.path.join(pyviz_comms.comm_path, "notebook.js"), "pyviz_comms"),
(os.path.join(pyviz_comms.comm_path, "labextension", "package.json"), "pyviz_comms/labextension"),
(panel.__path__[0], "panel"),
((os.path.join(PySide2.__path__[0], "plugins", "geoservices")), 'geoservices'),
(sklearn.__path__[0], "sklearn"),
(datashader.__path__[0], "datashader"),
(distributed.__path__[0], "distributed"),
(rasterio.__path__[0], "rasterio"),
(pyproj.__path__[0], "pyproj"),
(os.path.join(fiona.__path__[0], "*.pyd"), "fiona"), # Geospatial primitives
# Geopandas requires access to its data dir
(os.path.join(geopandas.__path__[0], "datasets"), "geopandas/datasets"),
(shiboken2.__path__[0], "shiboken2"), # C++ bindings
],
hiddenimports=[
"uu", # Binary data en/decode over ASCII sockets
"json",
"spatialpandas",
"pyproj.datadir", # CRS projection data
"llvmlite.binding", # Numba C bindings
"pyexpat", # XML parsing
"numba.cuda", # CUDA routines
"pyarrow.compute", # native routines
],
hookspath=[],
runtime_hooks=[],
excludes=[
"PySide2.Qt3DCore",
"PySide2.Qt3DInput",
"PySide2.Qt3DAnimation",
"PySide2.Qt3DExtras",
"PySide2.Qt3DLogic",
"PySide2.Qt3DRender",
"PySide2.QtMultimedia",
"Pyside2.QtCharts",
"PySide2.QtDataVisualization",
"PySide2.QtLocation",
"PySide2.QtTextToSpeech",
"PySide2.QtSql",
"PySide2.QtSerialPort",
"PySide2.QtSensors",
"PySide2.QtScript"
"PyQt5",
"PyQt4",
"tkinter",
# "pydoc",
"pdb",
"IPython",
"jupyter",
"coverage"
],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
if one_dir_mode:
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='SEEDPOD Ground Risk',
debug=True,
bootloader_ignore_signals=False,
strip=False,
upx=upx,
upx_exclude=upx_exclude,
console=True)
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=upx,
upx_exclude=upx_exclude,
name='SEEDPOD Ground Risk')
else:
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
exclude_binaries=False,
name='SEEDPOD Ground Risk',
debug=True,
bootloader_ignore_signals=False,
strip=False,
upx=upx,
upx_exclude=upx_exclude,
console=True)