Skip to content

Commit

Permalink
change app.spec
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaloney111 committed May 13, 2024
1 parent 8c8f6ef commit 904724a
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions app.spec
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
# -*- 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 copy_metadata
from PyInstaller.utils.hooks import copy_metadata_recursive
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(
['api\\app.py'],
[entry_point],
pathex=[],
binaries=[], # pathex=['C:\\Users\\camer\\anaconda3\\envs\\LinguifAI\\Lib\\site-packages', 'C:\\Users\\camer\\AppData\\Roaming\\Python\\Python310\\site-packages\\sklearn'],
datas=[],
hiddenimports=['sklearn'],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)

# Define PYZ (Python Zip) configuration
pyz = PYZ(a.pure)

# Define EXE (Executable) configuration
exe = EXE(
pyz,
a.scripts,
Expand All @@ -32,10 +51,12 @@ exe = EXE(
codesign_identity=None,
entitlements_file=None,
)

# Define COLLECT configuration
coll = COLLECT(
exe,
a.binaries,
a.datas,
binaries,
datas,
strip=False,
upx=True,
upx_exclude=[],
Expand Down

0 comments on commit 904724a

Please sign in to comment.