81 lines
1.9 KiB
RPMSpec
81 lines
1.9 KiB
RPMSpec
# -*- mode: python ; coding: utf-8 -*-
|
|
import os
|
|
|
|
from PyInstaller.utils.hooks import collect_all
|
|
|
|
project_root = os.path.abspath(os.path.join(SPECPATH, '..'))
|
|
icon_path = os.path.join(project_root, 'assets', 'ico', 'logo_new.ico')
|
|
datas = [(os.path.join(project_root, 'assets'), 'assets')]
|
|
binaries = []
|
|
hiddenimports = [
|
|
'step_editor.isolated_edit_worker',
|
|
'PySide6.QtCore',
|
|
'PySide6.QtGui',
|
|
'PySide6.QtWidgets',
|
|
'PySide6.QtOpenGL',
|
|
'PySide6.QtOpenGLWidgets',
|
|
'vtkmodules.qt.QVTKRenderWindowInteractor',
|
|
]
|
|
tmp_ret = collect_all('OCC')
|
|
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
|
|
tmp_ret = collect_all('vtkmodules')
|
|
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
|
|
|
|
|
|
a = Analysis(
|
|
[os.path.join(project_root, 'main.py')],
|
|
pathex=[project_root],
|
|
binaries=binaries,
|
|
datas=datas,
|
|
hiddenimports=hiddenimports,
|
|
hookspath=[],
|
|
hooksconfig={},
|
|
runtime_hooks=[],
|
|
excludes=[
|
|
'PySide6.QtWebEngineCore',
|
|
'PySide6.QtWebEngineWidgets',
|
|
'PySide6.QtWebEngineQuick',
|
|
'PySide6.QtQuick',
|
|
'PySide6.QtQml',
|
|
'PySide6.Qt3DAnimation',
|
|
'PySide6.Qt3DCore',
|
|
'PySide6.Qt3DExtras',
|
|
'PySide6.Qt3DInput',
|
|
'PySide6.Qt3DLogic',
|
|
'PySide6.Qt3DRender',
|
|
'PySide6.QtMultimedia',
|
|
'PySide6.QtMultimediaWidgets',
|
|
],
|
|
noarchive=False,
|
|
optimize=0,
|
|
)
|
|
pyz = PYZ(a.pure)
|
|
|
|
exe = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
[],
|
|
exclude_binaries=True,
|
|
name='main',
|
|
debug=False,
|
|
bootloader_ignore_signals=False,
|
|
strip=False,
|
|
upx=True,
|
|
console=True,
|
|
disable_windowed_traceback=False,
|
|
argv_emulation=False,
|
|
target_arch=None,
|
|
codesign_identity=None,
|
|
entitlements_file=None,
|
|
icon=icon_path,
|
|
)
|
|
coll = COLLECT(
|
|
exe,
|
|
a.binaries,
|
|
a.datas,
|
|
strip=False,
|
|
upx=True,
|
|
upx_exclude=[],
|
|
name='GeometryParametric',
|
|
)
|