lf_mri_gui.spec 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # -*- mode: python ; coding: utf-8 -*-
  2. # PyInstaller spec for lf_mri_gui
  3. #
  4. # Build: pyinstaller lf_mri_gui.spec
  5. # Output: dist\lf_mri_gui\lf_mri_gui.exe (one-folder mode)
  6. #
  7. # Run from the lf_mri_gui directory with venv activated.
  8. import sys
  9. from pathlib import Path
  10. HERE = Path(SPECPATH) # lf_mri_gui/
  11. REPO = HERE.parent # MRI-testing/
  12. block_cipher = None
  13. a = Analysis(
  14. [str(HERE / 'app.py')],
  15. pathex=[str(HERE), str(REPO)],
  16. binaries=[],
  17. datas=[
  18. # ── Config files ──────────────────────────────────────────
  19. (str(HERE / 'cfg' / 'server_config.json'), 'cfg'),
  20. (str(HERE / 'cfg' / 'hw_config.json'), 'cfg'),
  21. # ── LF Constraints preset ─────────────────────────────────
  22. (str(HERE / 'cfg' / 'updated_constraints_lf.json'), 'cfg'),
  23. # ── LF_scanner / pypulseq ─────────────────────────────────
  24. (str(REPO / 'LF_scanner'), 'LF_scanner'),
  25. ],
  26. hiddenimports=[
  27. # PySide6 plugins needed at runtime
  28. 'PySide6.QtSvg',
  29. 'PySide6.QtPrintSupport',
  30. # pyqtgraph internals
  31. 'pyqtgraph.graphicsItems.ViewBox.axisCtrlTemplate_pyqt5',
  32. 'pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyqt5',
  33. 'pyqtgraph.imageview.ImageViewTemplate_pyqt5',
  34. # numba
  35. 'numba',
  36. 'numba.core.compiler_lock',
  37. # scipy
  38. 'scipy._lib.messagestream',
  39. # httpx
  40. 'httpx',
  41. # yattag
  42. 'yattag',
  43. # src modules (discovered via pathex but listed as safety net)
  44. 'src.app_window',
  45. 'src.tabs.seq_interp_tab',
  46. 'src.tabs.scanner_tab',
  47. 'src.tabs.fid_tab',
  48. 'src.clients.orchestrator_client',
  49. 'src.clients.seq_interp_client',
  50. 'src.gui.workers',
  51. 'src.core.synchronizer',
  52. 'src.interfaces.pulseq_adapter',
  53. 'src.interfaces.xml_generator',
  54. 'src.fid.seqgen_FID',
  55. ],
  56. hookspath=[],
  57. hooksconfig={},
  58. runtime_hooks=[],
  59. excludes=[
  60. # Not needed in packaged app
  61. 'pytest',
  62. 'tkinter',
  63. 'IPython',
  64. 'notebook',
  65. 'jupyter',
  66. ],
  67. win_no_prefer_redirects=False,
  68. win_private_assemblies=False,
  69. cipher=block_cipher,
  70. noarchive=False,
  71. )
  72. pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
  73. exe = EXE(
  74. pyz,
  75. a.scripts,
  76. [],
  77. exclude_binaries=True,
  78. name='lf_mri_gui',
  79. debug=False,
  80. bootloader_ignore_signals=False,
  81. strip=False,
  82. upx=True,
  83. console=False, # no console window
  84. disable_windowed_traceback=False,
  85. target_arch=None,
  86. codesign_identity=None,
  87. entitlements_file=None,
  88. icon=None, # add icon=r'path\to\icon.ico' if available
  89. )
  90. coll = COLLECT(
  91. exe,
  92. a.binaries,
  93. a.zipfiles,
  94. a.datas,
  95. strip=False,
  96. upx=True,
  97. upx_exclude=[],
  98. name='lf_mri_gui',
  99. )