From: Ismaƫl Bouya Date: Sat, 25 Jun 2016 22:58:42 +0000 (+0200) Subject: Reduce package size X-Git-Tag: 1.0.0~78 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=d8046b94a52262d1453104de2df138a952cb4548;p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git Reduce package size --- diff --git a/music_sampler.py b/music_sampler.py index 7c0fc32..a7faea2 100644 --- a/music_sampler.py +++ b/music_sampler.py @@ -1,3 +1,5 @@ +import kivy +kivy.require("1.9.1") from kivy.app import App from kivy.uix.floatlayout import FloatLayout from kivy.uix.relativelayout import RelativeLayout diff --git a/music_sampler.spec b/music_sampler.spec index fca4005..a56c2dd 100644 --- a/music_sampler.spec +++ b/music_sampler.spec @@ -1,36 +1,17 @@ # -*- mode: python -*- +from kivy.tools.packaging.pyinstaller_hooks import get_deps_minimal, hookspath, runtime_hooks -block_cipher = None +excluded_and_hidden_modules = get_deps_minimal(video=None, camera=None, audio=None, clipboard=None, spelling=None) +excluded_and_hidden_modules['hiddenimports'] += [ 'six', 'packaging', 'packaging.version', 'packaging.specifiers', 'packaging.requirements'] a = Analysis(['music_sampler.py'], binaries=None, datas=[ - ('config.yml', '.'), ('fonts/*', 'fonts'), ('musicsampler.kv', '.') ], - hiddenimports=[ - 'six', - 'packaging', - 'packaging.version', - 'packaging.specifiers', - 'packaging.requirements' - ], - hookspath=[], - runtime_hooks=[], - excludes=[], - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=block_cipher) -pyz = PYZ(a.pure, a.zipped_data, - cipher=block_cipher) -exe = EXE(pyz, - a.scripts, - a.binaries, - a.zipfiles, - a.datas, - name='music_sampler', - debug=False, - strip=False, - upx=True, - console=True ) + hookspath=hookspath(), + runtime_hooks=runtime_hooks(), + **excluded_and_hidden_modules) +pyz = PYZ(a.pure, a.zipped_data) +exe = EXE(pyz, a.scripts, a.binaries, a.zipfiles, a.datas, name='music_sampler')