]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/commitdiff
Reduce package size
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sat, 25 Jun 2016 22:58:42 +0000 (00:58 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sat, 25 Jun 2016 22:58:42 +0000 (00:58 +0200)
music_sampler.py
music_sampler.spec

index 7c0fc3218a1d7f51e72b490d21eb35494936156e..a7faea24921b337e50e688164601276eb8ff36c5 100644 (file)
@@ -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
index fca40058fe09df989b2ea67796089924ed58192e..a56c2dd0f051076f11b63c9a8e64b68a6594aa58 100644 (file)
@@ -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')