aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2016-07-29 01:28:41 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2016-07-29 01:28:41 +0200
commitdd25f8f05f091ba876b784e3fd4ae6df309bd4a1 (patch)
tree9ffa12e63cc85601926afac126553626efcaab8c
parent3c0cb1f738f39c1e5800bd42d16189e72e365ec2 (diff)
downloadMusicSampler-dd25f8f05f091ba876b784e3fd4ae6df309bd4a1.tar.gz
MusicSampler-dd25f8f05f091ba876b784e3fd4ae6df309bd4a1.tar.zst
MusicSampler-dd25f8f05f091ba876b784e3fd4ae6df309bd4a1.zip
Code cleanup
-rw-r--r--music_sampler.spec10
-rw-r--r--music_sampler/app.py7
2 files changed, 12 insertions, 5 deletions
diff --git a/music_sampler.spec b/music_sampler.spec
index 5549b76..bd69562 100644
--- a/music_sampler.spec
+++ b/music_sampler.spec
@@ -6,7 +6,7 @@ from kivy.tools.packaging.pyinstaller_hooks import get_deps_minimal,\
6 6
7import importlib.machinery 7import importlib.machinery
8sysfont = importlib.machinery\ 8sysfont = importlib.machinery\
9 .SourceFileLoader('sysfont', os.getcwd() + '/music_sampler/sysfont.py') \ 9 .SourceFileLoader('sysfont', os.getcwd()+'/music_sampler/sysfont.py') \
10 .load_module() 10 .load_module()
11 11
12excluded_and_hidden_modules = get_deps_minimal( 12excluded_and_hidden_modules = get_deps_minimal(
@@ -40,7 +40,13 @@ a = Analysis(['run.py'],
40 runtime_hooks=runtime_hooks(), 40 runtime_hooks=runtime_hooks(),
41 **excluded_and_hidden_modules) 41 **excluded_and_hidden_modules)
42 42
43for fontname, style in [("Ubuntu", sysfont.STYLE_NORMAL), ("Ubuntu", sysfont.STYLE_BOLD), ("Symbola", sysfont.STYLE_NONE)]: 43fonts = [
44 ("Ubuntu", sysfont.STYLE_NORMAL),
45 ("Ubuntu", sysfont.STYLE_BOLD),
46 ("Symbola", sysfont.STYLE_NONE)
47]
48
49for fontname, style in fonts:
44 font = sysfont.get_font(fontname, style=style) 50 font = sysfont.get_font(fontname, style=style)
45 a.datas.append(( 51 a.datas.append((
46 'fonts/{}_{}.ttf'.format(fontname, style), 52 'fonts/{}_{}.ttf'.format(fontname, style),
diff --git a/music_sampler/app.py b/music_sampler/app.py
index cce3969..08a8891 100644
--- a/music_sampler/app.py
+++ b/music_sampler/app.py
@@ -6,16 +6,17 @@ import kivy
6kivy.require("1.9.1") 6kivy.require("1.9.1")
7from kivy.app import App 7from kivy.app import App
8from kivy.uix.floatlayout import FloatLayout 8from kivy.uix.floatlayout import FloatLayout
9from kivy.uix.stacklayout import StackLayout
10from kivy.uix.relativelayout import RelativeLayout 9from kivy.uix.relativelayout import RelativeLayout
11from kivy.properties import ListProperty, StringProperty 10from kivy.properties import ListProperty, StringProperty
12from kivy.core.window import Window 11from kivy.core.window import Window
13from kivy.lang import Builder 12from kivy.lang import Builder
14from .key import Key
15from .mapping import Mapping
16 13
17register_fonts() 14register_fonts()
18 15
16
17from .key import Key
18from .mapping import Mapping
19
19from .app_blocks.actionlist import * 20from .app_blocks.actionlist import *
20from .app_blocks.playlist import * 21from .app_blocks.playlist import *
21 22