]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - music_sampler.spec
Use setuptools_scm to determinate project version
[perso/Immae/Projets/Python/MusicSampler.git] / music_sampler.spec
index 0d99dca2caefcc67238169feeb09ab7fdcf94b1a..5549b767f957bf77f38eb89c7dd11edb6ba8a84f 100644 (file)
@@ -1,11 +1,12 @@
 # -*- mode: python -*-
 import os
+import setuptools_scm
 from kivy.tools.packaging.pyinstaller_hooks import get_deps_minimal,\
         hookspath, runtime_hooks
 
 import importlib.machinery
 sysfont = importlib.machinery\
-        .SourceFileLoader('sysfont', os.getcwd() + '/helpers/sysfont.py') \
+        .SourceFileLoader('sysfont', os.getcwd() + '/music_sampler/sysfont.py') \
         .load_module()
 
 excluded_and_hidden_modules = get_deps_minimal(
@@ -22,17 +23,17 @@ excluded_and_hidden_modules['hiddenimports'] += [
         'packaging.specifiers',
         'packaging.requirements' ]
 
-commit_message = os.popen('git log -1 --format="%h  %ci"').read()
+commit_message = setuptools_scm.get_version()
 pyinstaller_file = open(".pyinstaller_commit", "w")
 pyinstaller_file.write(commit_message)
 pyinstaller_file.close()
 
 data = [
-  ('music_sampler.kv', '.'),
+  ('music_sampler/music_sampler.kv', '.'),
   ('.pyinstaller_commit', '.')
 ]
 
-a = Analysis(['music_sampler.py'],
+a = Analysis(['run.py'],
              binaries=None,
              datas=data,
              hookspath=hookspath(),