lf_mri_gui.spec 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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.fid.seqgen_FID',
  52. ],
  53. hookspath=[],
  54. hooksconfig={},
  55. runtime_hooks=[],
  56. excludes=[
  57. # Not needed in packaged app
  58. 'pytest',
  59. 'tkinter',
  60. 'IPython',
  61. 'notebook',
  62. 'jupyter',
  63. ],
  64. win_no_prefer_redirects=False,
  65. win_private_assemblies=False,
  66. cipher=block_cipher,
  67. noarchive=False,
  68. )
  69. pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
  70. exe = EXE(
  71. pyz,
  72. a.scripts,
  73. [],
  74. exclude_binaries=True,
  75. name='lf_mri_gui',
  76. debug=False,
  77. bootloader_ignore_signals=False,
  78. strip=False,
  79. upx=True,
  80. console=False, # no console window
  81. disable_windowed_traceback=False,
  82. target_arch=None,
  83. codesign_identity=None,
  84. entitlements_file=None,
  85. icon=None, # add icon=r'path\to\icon.ico' if available
  86. )
  87. coll = COLLECT(
  88. exe,
  89. a.binaries,
  90. a.zipfiles,
  91. a.datas,
  92. strip=False,
  93. upx=True,
  94. upx_exclude=[],
  95. name='lf_mri_gui',
  96. )