From 7d44a6985d1d3b007a0edd2d8071ca97272643e8 Mon Sep 17 00:00:00 2001 From: oldnapalm <38410858+oldnapalm@users.noreply.github.com> Date: Fri, 30 May 2025 18:35:30 -0300 Subject: [PATCH] Exclude pkg_resources Avoids deprecation warning at run-time (https://github.com/pyinstaller/pyinstaller/issues/9149). Exclude Java Temurin binaries (from GitHub windows-latest image). --- standalone.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/standalone.spec b/standalone.spec index b35aaad..da82c91 100644 --- a/standalone.spec +++ b/standalone.spec @@ -14,11 +14,12 @@ a = Analysis(['standalone.py'], hiddenimports=[], hookspath=[], runtime_hooks=[], - excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'], + excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter', 'pkg_resources'], win_no_prefer_redirects=False, win_private_assemblies=False, cipher=block_cipher, noarchive=False) +a.binaries = [x for x in a.binaries if not 'Java_Temurin' in x[1]] a.datas += Tree('cdn', prefix='cdn') pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) @@ -33,7 +34,7 @@ exe = EXE(pyz, bootloader_ignore_signals=False, strip=False, upx=True, - upx_exclude=['greenlet\\*.pyd', '_uuid.pyd', 'python3.dll', 'api-ms-win-*.dll'], + upx_exclude=['greenlet\\*.pyd', '_uuid.pyd', 'python3.dll'], runtime_tmpdir=None, console=True )