first commit
This commit is contained in:
@@ -0,0 +1,98 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from PyInstaller.utils.hooks import collect_all, collect_submodules
|
||||
|
||||
|
||||
repo_root = Path.cwd()
|
||||
src_dir = repo_root / "src"
|
||||
work_dir = repo_root / "build" / "pyinstaller_work"
|
||||
|
||||
datas = [
|
||||
(str(repo_root / "config"), "config"),
|
||||
(str(repo_root / "steps"), "steps"),
|
||||
]
|
||||
binaries = []
|
||||
hiddenimports = [
|
||||
"sensor_bench.main",
|
||||
"sensor_bench.app",
|
||||
"sensor_bench.acquisition",
|
||||
"sensor_bench.config_loader",
|
||||
"sensor_bench.i18n",
|
||||
"sensor_bench.paths",
|
||||
"sensor_bench.plot_history",
|
||||
"sensor_bench.recorder",
|
||||
"orisys",
|
||||
"orisys_blend",
|
||||
"scipy.fft",
|
||||
"scipy.ndimage",
|
||||
"scipy.sparse.linalg",
|
||||
"numba",
|
||||
"llvmlite",
|
||||
]
|
||||
|
||||
for package in ("PyQt5", "pyqtgraph", "cv2", "orisys", "orisys_blend", "numba", "llvmlite"):
|
||||
pkg_datas, pkg_binaries, pkg_hidden = collect_all(package)
|
||||
datas += pkg_datas
|
||||
binaries += pkg_binaries
|
||||
hiddenimports += pkg_hidden
|
||||
|
||||
hiddenimports += collect_submodules("orisys_blend")
|
||||
|
||||
excludes = [
|
||||
"cupy",
|
||||
"cupyx",
|
||||
"pyopencl",
|
||||
"open3d",
|
||||
"matplotlib",
|
||||
"tkinter",
|
||||
"pytest",
|
||||
"pip",
|
||||
"wheel",
|
||||
]
|
||||
|
||||
a = Analysis(
|
||||
[str(repo_root / "run.py")],
|
||||
pathex=[str(repo_root), str(src_dir)],
|
||||
binaries=binaries,
|
||||
datas=datas,
|
||||
hiddenimports=hiddenimports,
|
||||
hookspath=[],
|
||||
hooksconfig={},
|
||||
runtime_hooks=[],
|
||||
excludes=excludes,
|
||||
noarchive=False,
|
||||
optimize=0,
|
||||
)
|
||||
|
||||
pyz = PYZ(a.pure)
|
||||
|
||||
exe = EXE(
|
||||
pyz,
|
||||
a.scripts,
|
||||
[],
|
||||
exclude_binaries=True,
|
||||
name="SensorBench",
|
||||
debug=False,
|
||||
bootloader_ignore_signals=False,
|
||||
strip=False,
|
||||
upx=True,
|
||||
console=False,
|
||||
disable_windowed_traceback=False,
|
||||
argv_emulation=False,
|
||||
target_arch=None,
|
||||
codesign_identity=None,
|
||||
entitlements_file=None,
|
||||
)
|
||||
|
||||
coll = COLLECT(
|
||||
exe,
|
||||
a.binaries,
|
||||
a.datas,
|
||||
strip=False,
|
||||
upx=True,
|
||||
upx_exclude=[],
|
||||
name="SensorBench",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user