From 456436b0a1c86b3613628eed2b205eedafa9fb99 Mon Sep 17 00:00:00 2001 From: Cameron Date: Mon, 17 Jun 2024 12:40:49 -0600 Subject: [PATCH] Add app.spec --- .github/workflows/develop.yml | 4 ++-- .github/workflows/main.yml | 2 +- api/app.spec | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 6b2ab824..4686134d 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -82,8 +82,8 @@ jobs: run: pip install -r api/requirements.txt pyinstaller==6.6.0 - name: Build flask exe - run: pyinstaller --name app --onefile --console api/app.py --hidden-import=tiktoken_ext.openai_public --hidden-import=tiktoken_ext - + run: pyinstaller app.spec + - name: Install dependencies run: npm install diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1a7a4092..dbf49572 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -82,7 +82,7 @@ jobs: run: pip install -r api/requirements.txt pyinstaller==6.6.0 - name: Build flask exe - run: pyinstaller --name app --onefile --console api/app.py --hidden-import=tiktoken_ext.openai_public --hidden-import=tiktoken_ext + run: pyinstaller app.spec - name: Install dependencies run: npm install diff --git a/api/app.spec b/api/app.spec index d5abf94e..46b741c0 100644 --- a/api/app.spec +++ b/api/app.spec @@ -1,3 +1,4 @@ + # -*- mode: python ; coding: utf-8 -*- entry_point = 'app.py' @@ -9,7 +10,7 @@ a = Analysis( pathex=[], binaries=[], datas=[], - hiddenimports=[], + hiddenimports=['tiktoken_ext.openai_public', 'tiktoken_ext'], hookspath=[], hooksconfig={}, runtime_hooks=[], @@ -48,4 +49,4 @@ coll = COLLECT( upx=True, upx_exclude=[], name='app', -) +) \ No newline at end of file