4 from kivy.tools.packaging.pyinstaller_hooks import get_deps_minimal
,\
5 hookspath
, runtime_hooks
7 import importlib.machinery
8 sysfont
= importlib.machinery\
9 .SourceFileLoader
('sysfont'
, os.getcwd
() + '
/music_sampler
/sysfont.py'
) \
12 excluded_and_hidden_modules
= get_deps_minimal
(
19 excluded_and_hidden_modules
['hiddenimports'
] += [
23 'packaging.specifiers'
,
24 'packaging.requirements'
]
26 commit_message
= setuptools_scm.get_version
()
27 pyinstaller_file
= open
(".pyinstaller_commit"
, "w"
)
28 pyinstaller_file.write
(commit_message
)
29 pyinstaller_file.close
()
32 ('music_sampler
/music_sampler.kv'
, '.'
),
33 ('.pyinstaller_commit'
, '.'
)
36 a
= Analysis
(['run.py'
],
39 hookspath
=hookspath
(),
40 runtime_hooks
=runtime_hooks
(),
41 **excluded_and_hidden_modules
)
43 for fontname
, style
in [("Ubuntu"
, sysfont.STYLE_NORMAL
), ("Ubuntu"
, sysfont.STYLE_BOLD
), ("Symbola"
, sysfont.STYLE_NONE
)]:
44 font
= sysfont.get_font
(fontname
, style
=style
)
46 'fonts
/{}_
{}.ttf'.format
(fontname
, style
),
51 pyz
= PYZ
(a.pure
, a.zipped_data
)
54 exe
= EXE
(pyz
, a.scripts
, a.binaries
, a.zipfiles
, a.datas
,
58 # exe = EXE(pyz, a.scripts,
59 # exclude_binaries=True,
60 # name='music_sampler_dir',
65 # coll = COLLECT(exe, a.binaries, a.zipfiles, a.datas,
68 # name='music_sampler_dir')