X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=music_sampler.spec;h=7a885fd5ac837da5b90142debaf6531057214610;hb=29597680758e4924aa71fc021465189e153f2016;hp=3c85a2ac298e9155d8cfbbb6c82607c8e949eb12;hpb=94b508ae92f42e61e5f4c4b1c3a06e58694ca8ef;p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git diff --git a/music_sampler.spec b/music_sampler.spec index 3c85a2a..7a885fd 100644 --- a/music_sampler.spec +++ b/music_sampler.spec @@ -1,32 +1,24 @@ # -*- mode: python -*- +import os +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'] + +commit_message = os.popen('git log -1 --format="%h %ci"').read() +pyinstaller_file = open(".pyinstaller_commit", "w") +pyinstaller_file.write(commit_message) +pyinstaller_file.close() a = Analysis(['music_sampler.py'], binaries=None, - datas=[('config.yml', '.'), ('Ubuntu-Regular.ttf', '.')], - hiddenimports=[ - 'six', - 'packaging', - 'packaging.version', - 'packaging.specifiers', - 'packaging.requirements' + datas=[ + ('fonts/*', 'fonts'), + ('music_sampler.kv', '.'), + ('.pyinstaller_commit', '.') ], - 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')