-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fc12ed
commit e303725
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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', | ||
) |