From 5ba4ac2bb1cbb4ccaa8c494298be128566ce7921 Mon Sep 17 00:00:00 2001 From: uh_wot <3631986-uh_wot@users.noreply.gitlab.com> Date: Tue, 26 May 2020 12:49:48 +0200 Subject: [PATCH] excluding unneeded tkinter module in spec files --- deemix_gui.spec | 7 ++++--- server.spec | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/deemix_gui.spec b/deemix_gui.spec index 62d2fe6..27495d3 100644 --- a/deemix_gui.spec +++ b/deemix_gui.spec @@ -1,10 +1,11 @@ # -*- mode: python ; coding: utf-8 -*- import deemix +import sys from os.path import dirname -from sys import platform block_cipher = None +sys.modules['FixTk'] = None a = Analysis(['deemix_gui.py'], binaries=[], @@ -12,7 +13,7 @@ a = Analysis(['deemix_gui.py'], hiddenimports=['engineio.async_drivers.threading', 'pkg_resources.py2_warn'], hookspath=[], runtime_hooks=[], - excludes=[], + excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'], win_no_prefer_redirects=False, win_private_assemblies=False, cipher=block_cipher, @@ -28,7 +29,7 @@ exe = EXE(pyz, bootloader_ignore_signals=False, strip=False, upx=True, - console=True, icon=f"icon.{'icns' if platform.startswith('darwin') else 'ico'}" ) + console=True, icon=f"icon.{'icns' if sys.platform.startswith('darwin') else 'ico'}" ) coll = COLLECT(exe, a.binaries, a.zipfiles, diff --git a/server.spec b/server.spec index ee38a3d..f43abfb 100644 --- a/server.spec +++ b/server.spec @@ -1,16 +1,19 @@ # -*- mode: python ; coding: utf-8 -*- import deemix +import sys from os.path import dirname block_cipher = None +sys.modules['FixTk'] = None + a = Analysis(['server.py'], binaries=[], datas=[('webui/public', 'webui/public'), (f'{dirname(deemix.__file__)}/app/default.json','deemix/app')], hiddenimports=['engineio.async_drivers.threading', 'pkg_resources.py2_warn'], hookspath=[], runtime_hooks=[], - excludes=[], + excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'], win_no_prefer_redirects=False, win_private_assemblies=False, cipher=block_cipher,