X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=music_sampler.spec;h=5bae7141d688e037041a89ff97e0a83d388557b6;hb=75d6cdbac628b57e206cd37808c1d3c7fecbb9eb;hp=a56c2dd0f051076f11b63c9a8e64b68a6594aa58;hpb=d8046b94a52262d1453104de2df138a952cb4548;p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git diff --git a/music_sampler.spec b/music_sampler.spec index a56c2dd..5bae714 100644 --- a/music_sampler.spec +++ b/music_sampler.spec @@ -1,17 +1,30 @@ # -*- mode: python -*- +import os from kivy.tools.packaging.pyinstaller_hooks import get_deps_minimal, hookspath, runtime_hooks 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=[ ('fonts/*', 'fonts'), - ('musicsampler.kv', '.') + ('music_sampler.kv', '.'), + ('.pyinstaller_commit', '.') ], hookspath=hookspath(), runtime_hooks=runtime_hooks(), **excluded_and_hidden_modules) pyz = PYZ(a.pure, a.zipped_data) + +# Single file exe = EXE(pyz, a.scripts, a.binaries, a.zipfiles, a.datas, name='music_sampler') + +# Directory +# exe = EXE(pyz, a.scripts, exclude_binaries=True, name='music_sampler_dir', debug=False, strip=False, upx=True, console=True ) +# coll = COLLECT(exe, a.binaries, a.zipfiles, a.datas, strip=False, upx=True, name='music_sampler_dir')