From e30372542e7289a689a517a488f9585987e43dd0 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 13 May 2024 13:46:21 -0700 Subject: [PATCH] No optimize --- app.spec | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 app.spec diff --git a/app.spec b/app.spec new file mode 100644 index 00000000..3013269b --- /dev/null +++ b/app.spec @@ -0,0 +1,61 @@ +# -*- mode: python ; coding: utf-8 -*- + +# Import necessary modules +from PyInstaller.utils.hooks import collect_data_files +from PyInstaller.utils.hooks import collect_submodules +from PyInstaller.utils.hooks import collect_dynamic_libs + +# Specify the entry point Python script +entry_point = 'api/app.py' + +# Collect necessary data files and binaries +datas = collect_data_files('sklearn') +hiddenimports = collect_submodules('sklearn') +binaries = collect_dynamic_libs('sklearn') + +# Define Analysis configuration +a = Analysis( + [entry_point], + pathex=[], + binaries=binaries, + datas=datas, + hiddenimports=hiddenimports, + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, +) + +# Define PYZ (Python Zip) configuration +pyz = PYZ(a.pure) + +# Define EXE (Executable) configuration +exe = EXE( + pyz, + a.scripts, + [], + exclude_binaries=True, + name='app', + 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, +) + +# Define COLLECT configuration +coll = COLLECT( + exe, + binaries, + datas, + strip=False, + upx=True, + upx_exclude=[], + name='app', +)