kitbash 1.9.0__tar.gz → 1.10.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {kitbash-1.9.0 → kitbash-1.10.0}/PKG-INFO +2 -2
  2. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/__init__.py +1 -1
  3. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/__main__.py +36 -9
  4. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/gui/main_window.py +0 -2
  5. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/install.py +14 -12
  6. {kitbash-1.9.0 → kitbash-1.10.0}/pyproject.toml +2 -2
  7. {kitbash-1.9.0 → kitbash-1.10.0}/.gitignore +0 -0
  8. {kitbash-1.9.0 → kitbash-1.10.0}/LICENSE +0 -0
  9. {kitbash-1.9.0 → kitbash-1.10.0}/README.md +0 -0
  10. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/gui/__init__.py +0 -0
  11. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/gui/drumkit_widget.py +0 -0
  12. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/gui/kit_save_dialog.py +0 -0
  13. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/gui/main_window.ui +0 -0
  14. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/jack_audio.py +0 -0
  15. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/res/empty.sfz +0 -0
  16. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/res/group_expanded.svg +0 -0
  17. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/res/group_hidden.svg +0 -0
  18. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/res/kitbash-icon.png +0 -0
  19. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/res/kitbash-icon.svg +0 -0
  20. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/res/save-sfz-icon.svg +0 -0
  21. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/scripts/bash_project.py +0 -0
  22. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/styles/light.css +0 -0
  23. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/styles/system.css +0 -0
  24. {kitbash-1.9.0 → kitbash-1.10.0}/kitbash/worker_threads.py +0 -0
  25. {kitbash-1.9.0 → kitbash-1.10.0}/tests/file_save_dialog.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kitbash
3
- Version: 1.9.0
3
+ Version: 1.10.0
4
4
  Summary: Provides universal settings, styles, cached icons, and pixmaps, and the base
5
5
  Author-email: Leon Dionne <ldionne@dridesign.sh.cn>
6
6
  Description-Content-Type: text/markdown
@@ -11,7 +11,7 @@ Requires-Dist: qt_liquid_pool >= 1.2.0
11
11
  Requires-Dist: recent_items_list >= 1.1.2
12
12
  Requires-Dist: sfzen >= 2.3.2
13
13
  Requires-Dist: soso_qt_extras >= 1.7.0
14
- Requires-Dist: xdg_soso >= 0.2.0
14
+ Requires-Dist: xdg_soso >= 1.0.2
15
15
  Project-URL: Home, https://github.com/Zen-Master-SoSo/kitbash
16
16
 
17
17
  # KitBash
@@ -29,7 +29,7 @@ from PyQt5.QtCore import QSettings
29
29
  from PyQt5.QtWidgets import QApplication, QSplitter
30
30
  from qt_extras import DevilBox
31
31
 
32
- __version__ = "1.9.0"
32
+ __version__ = "1.10.0"
33
33
 
34
34
  APPLICATION_NAME = "kitbash"
35
35
  PACKAGE_DIR = dirname(__file__)
@@ -21,19 +21,36 @@
21
21
  kitbash is a program you can use to combine parts of various SFZ files into a
22
22
  new SFZ with instruments "borrowed" from the originals.
23
23
  """
24
- import sys, os, argparse, logging
25
- from PyQt5.QtWidgets import QApplication, QErrorMessage
24
+ import sys, logging
25
+ from os import environ, getlogin
26
+ from argparse import ArgumentParser
27
+ from PyQt5.QtWidgets import QApplication
26
28
  from qt_extras import exceptions_hook
29
+ from xdg_soso import is_xdg
30
+ from kitbash.install import KitbashSetup
27
31
  from kitbash.gui.main_window import MainWindow
28
32
 
29
33
 
30
34
  def main():
31
- p = argparse.ArgumentParser()
32
- p.epilog = __doc__
33
- p.add_argument('Filename', type=str, nargs='?', help='SFZ file[s] to include at startup')
34
- p.add_argument("--log-file", "-l", type=str, help="Log to this file")
35
- p.add_argument("--verbose", "-v", action="store_true", help="Show more detailed debug information")
36
- options = p.parse_args()
35
+ parser = ArgumentParser()
36
+ parser.epilog = __doc__
37
+ parser.add_argument('Filename', type=str, nargs='?',
38
+ help='SFZ file[s] to include at startup')
39
+ parser.add_argument("--log-file", "-l", type=str,
40
+ help="Log to this file")
41
+ if is_xdg():
42
+ parser.add_argument('--install', '-i', action = 'store_true',
43
+ help = """Install this application into your desktop
44
+ environment. This will create a desktop launcher so you can start KitBash from
45
+ your menu or Dash, and associate KitBash with SFZ files.""")
46
+ parser.add_argument('--uninstall', '-u', action = 'store_true',
47
+ help = """Remove KitBash from your desktop environment.
48
+ The program will still be on your computer, and can be called from the command
49
+ line as "kitbash", but you won't be able to see it in your desktop applications
50
+ menu.""")
51
+ parser.add_argument("--verbose", "-v", action="store_true",
52
+ help="Show more detailed debug information")
53
+ options = parser.parse_args()
37
54
 
38
55
  log_level = logging.DEBUG if options.verbose else logging.ERROR
39
56
  log_format = "[%(filename)24s:%(lineno)4d] %(levelname)-8s %(message)s"
@@ -50,11 +67,21 @@ def main():
50
67
  format = log_format
51
68
  )
52
69
 
70
+ if is_xdg() and (options.install or options.uninstall):
71
+ installer = KitbashSetup()
72
+ if options.install:
73
+ installer.install()
74
+ print(f'Successfully installed KitBash for {getlogin()} on this machine.')
75
+ else:
76
+ installer.uninstall()
77
+ print(f'Successfully uninstalled KitBash for {getlogin()} on this machine.')
78
+ return 0
79
+
53
80
  #-----------------------------------------------------------------------
54
81
  # Annoyance fix per:
55
82
  # https://stackoverflow.com/questions/986964/qt-session-management-error
56
83
  try:
57
- del os.environ['SESSION_MANAGER']
84
+ del environ['SESSION_MANAGER']
58
85
  except KeyError:
59
86
  pass
60
87
  #-----------------------------------------------------------------------
@@ -46,7 +46,6 @@ from kitbash import (
46
46
  from kitbash.worker_threads import KitLoader, KitBasher
47
47
  from kitbash.gui.drumkit_widget import DrumkitWidget
48
48
  from kitbash.gui.kit_save_dialog import KitSaveDialog
49
- from kitbash.install import install
50
49
 
51
50
 
52
51
  UPDATES_DEBOUNCE = 680
@@ -123,7 +122,6 @@ class MainWindow(QMainWindow, GeometrySaver):
123
122
  self.audio.connect()
124
123
  if self.options.Filename:
125
124
  self.load_project(self.options.Filename)
126
- install()
127
125
 
128
126
  def setup_kits_area(self):
129
127
  self.drumkit_widgets = VListLayout(end_space = 10)
@@ -22,21 +22,23 @@ Install phoney-dictate as an application on XDG-compliant systems (like gnome).
22
22
  """
23
23
  import logging
24
24
  from os.path import dirname, join
25
- from xdg_soso import XDGSetup, is_xdg
25
+ from xdg_soso import XDGSetup
26
26
 
27
- def install():
28
- if is_xdg():
29
- xdg = XDGSetup('kitbash', 'Kitbash')
30
- xdg.comment = "Bash together new .SFZ drumkits from pieces of existing ones."
31
- xdg.application_icon = join(dirname(__file__), 'res', 'kitbash-icon.svg')
32
- xdg.categories = ['AudioVideo', 'Audio']
33
- xdg.keywords = ['Audio', 'Sound', 'midi', 'SFZ', 'Drumkit']
34
- xdg.install()
27
+ class KitbashSetup(XDGSetup):
28
+
29
+ def __init__(self):
30
+ super().__init__('kitbash', 'Kitbash')
31
+ self._comment = "Bash together new .SFZ drumkits from pieces of existing ones."
32
+ self._vendor_name = 'zen_soso'
33
+ self._application_icon = join(dirname(__file__), 'res', 'kitbash-icon.svg')
34
+ self._categories = ['AudioVideo', 'Audio']
35
+ self._keywords = ['Audio', 'Sound', 'midi', 'SFZ', 'Drumkit']
35
36
 
36
37
  if __name__ == '__main__':
37
- log_format = "[%(filename)24s:%(lineno)4d] %(levelname)-8s %(message)s"
38
- logging.basicConfig(level = logging.DEBUG, format = log_format)
39
- install()
38
+ logging.basicConfig(level = logging.DEBUG,
39
+ format = "[%(filename)24s:%(lineno)4d] %(levelname)-8s %(message)s")
40
+ installer = KitbashSetup()
41
+ installer.install()
40
42
 
41
43
 
42
44
  # end kitbash/kitbash/install.py
@@ -12,7 +12,7 @@ dependencies = [
12
12
  "recent_items_list >= 1.1.2",
13
13
  "sfzen >= 2.3.2",
14
14
  "soso_qt_extras >= 1.7.0",
15
- "xdg_soso >= 0.2.0"
15
+ "xdg_soso >= 1.0.2"
16
16
  ]
17
17
 
18
18
  [project.urls]
@@ -27,7 +27,7 @@ requires = ["flit_core >=3.2,<4"]
27
27
  build-backend = "flit_core.buildapi"
28
28
 
29
29
  [bumpver]
30
- current_version = "1.9.0"
30
+ current_version = "1.10.0"
31
31
  version_pattern = "MAJOR.MINOR.PATCH"
32
32
  commit_message = "Bump version {old_version} -> {new_version}"
33
33
  commit = true
File without changes
File without changes
File without changes
File without changes
File without changes