From 32a156dfde22f03c9ed2117909689cd99690efa9 Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Thu, 18 May 2023 14:21:51 -0600 Subject: fix sv-ttk --- .github/workflows/ci.yml | 2 +- main.spec | 22 ++++++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9116fe..04d541f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Package for Windows run: | pip install pyinstaller pandas xlrd openpyxl Pillow matplotlib sv-ttk ttkwidgets - pyinstaller --add-data "assets;assets" --onefile -c --noconfirm main.py + pyinstaller --add-data "assets;assets" --onefile -c --noconfirm --collect-data sv_ttk main.py - uses: actions/upload-artifact@v3 with: name: pyramid-scheme diff --git a/main.spec b/main.spec index 923b84d..ab14294 100644 --- a/main.spec +++ b/main.spec @@ -1,4 +1,8 @@ # -*- mode: python ; coding: utf-8 -*- +from PyInstaller.utils.hooks import collect_data_files + +datas = [('assets', 'assets')] +datas += collect_data_files('sv_ttk') block_cipher = None @@ -8,7 +12,7 @@ a = Analysis( ['main.py'], pathex=[], binaries=[], - datas=[('assets', 'assets')], + datas=datas, hiddenimports=[], hookspath=[], hooksconfig={}, @@ -24,17 +28,13 @@ pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) exe = EXE( pyz, a.scripts, - a.binaries, - a.zipfiles, - a.datas, [], + exclude_binaries=True, name='main', debug=False, bootloader_ignore_signals=False, strip=False, upx=True, - upx_exclude=[], - runtime_tmpdir=None, console=True, disable_windowed_traceback=False, argv_emulation=False, @@ -42,3 +42,13 @@ exe = EXE( codesign_identity=None, entitlements_file=None, ) +coll = COLLECT( + exe, + a.binaries, + a.zipfiles, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='main', +) -- cgit v1.2.3