Let application decides on how to handle signals.
[laditools.git] / setup.py
blobe5f21e96c54f83fa08aafd4e157025bd19f401f5
1 #!/usr/bin/python
3 # LADITools - Linux Audio Desktop Integration Tools
4 # setup.py - Setup script for the LADITools suite
5 # Copyright (C) 2011-2012 Alessio Treglia <quadrispro@ubuntu.com>
6 # Copyright (C) 2007-2008, Marc-Olivier Barre <marco@marcochapeau.org>
7 # Copyright (C) 2007-2008, Nedko Arnaudov <nedko@arnaudov.name>
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 import os
23 import sys
24 import subprocess
25 import glob
26 from distutils.core import setup
27 from distutils.command.clean import clean
28 from DistUtilsExtra.command import *
30 laditools_version = "1.0~rc7"
31 get_commit_script = "gitcommit.sh"
32 pkg_short_desc = "Linux Audio Desktop Integration Tools"
33 pkg_long_desc = """LADITools is a set of tools aiming to achieve the goals of the LADI project to improve desktop integration and user workflow of Linux audio system based on JACK and ladish. Those tools take advantage of the D-Bus interfaces recently added to JACK and ladish to ease the configuration and use of those two great softwares.
35 The following tools are included:
36 * g15ladi - a JACK monitor for g15 keyboards
37 * ladi-control-center - graphical configuration tool to setup JACK's configuration
38 * ladi-player - convenient VLC-style application to control JACK and manage studios
39 * ladi-system-log - JACK, ladish and a2jmidid log viewer
40 * ladi-system-tray - system indicator that allows users to start, stop and monitor
41 JACK, as well as start some JACK related applications
42 * wmladi - Window Maker dockapp for controlling the LADI system"""
43 pkg_data_files = [('share/laditools/data', glob.glob('data/*.ui')),
44 ('share/laditools/data', glob.glob('data/*.svg'))]
45 pkg_scripts = ['g15ladi',
46 'ladi-control-center',
47 'ladi-player',
48 'ladi-system-log',
49 'ladi-system-tray',
50 'wmladi',]
52 os.environ['XGETTEXT_ARGS'] = "--language=Python"
54 if not os.getenv("LADI_RELEASE") and \
55 os.path.isfile(get_commit_script):
56 commit = subprocess.check_output(["sh", get_commit_script]).strip()
57 laditools_version += "~" + commit
59 iconsizelist = "16 22 24 32 48 64 96 128 256".split()
61 class build_icons_extra(build_icons.build_icons):
62 def run(self):
63 icondir = os.path.join('data', 'icons')
64 scalabledir = os.path.join(icondir, "scalable")
65 categories = os.listdir(scalabledir)
67 for size in iconsizelist:
68 sizedir = os.path.join(icondir, "%(size)sx%(size)s" % {'size':size})
69 for category in categories:
70 sizecategorydir = os.path.join(sizedir, category)
71 self.spawn(['mkdir', '-p', sizecategorydir])
72 for filename in os.listdir(os.path.join(scalabledir, category)):
73 newfilename = filename.rstrip('svg') + 'png'
74 self.spawn(['rsvg',
75 '-w', size, '-h', size,
76 os.path.join(scalabledir, category, filename),
77 os.path.join(sizecategorydir, newfilename)])
79 build_icons.build_icons.run(self)
81 class clean_extra(clean_i18n.clean_i18n):
82 def run(self):
83 clean_i18n.clean_i18n.run(self)
85 for path, dirs, files in os.walk('.'):
86 for f in files:
87 f = os.path.join(path, f)
88 if f.endswith('.pyc'):
89 self.spawn(['rm', f])
90 for d in dirs:
91 if d == '__pycache__':
92 self.spawn(['rm', '-r', os.path.join(path,d)])
94 for path, dirs, files in os.walk('./data/icons'):
95 if path.endswith('icons'):
96 for d in dirs:
97 if d != 'scalable':
98 self.spawn(['rm', '-r', os.path.join(path,d)])
99 break
101 setup(name='laditools',
102 version=laditools_version,
103 author='Marc-Olivier Barre, Nedko Arnaudov and Alessio Treglia',
104 author_email='linux-audio-dev@lists.linuxaudio.org',
105 license='GPL-3',
106 url='https://launchpad.net/laditools',
107 download_url='https://launchpad.net/laditools/+download',
108 description=pkg_short_desc,
109 long_description=pkg_long_desc,
110 packages=['laditools', 'laditools.gtk'],
111 scripts=pkg_scripts,
112 data_files=pkg_data_files,
113 cmdclass={
114 'build' : build_extra.build_extra,
115 'build_i18n' : build_i18n.build_i18n,
116 'build_icons' : build_icons_extra,
117 'clean' : clean_extra}