Better handle processes. On first double-click gladish runs, on the next one it closes.
[laditools.git] / setup.py
blob0ddd0238ce30860e5d741c90de8cb70348b04a2c
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 * laditray - a system tray icon that allows users to start, stop and
37 monitor JACK, as well as start some JACK related applications
38 * ladilog - a JACK, ladish and a2jmidid log viewer
39 * ladiconf - a GUI to setup JACK's configuration
40 * g15ladi - a JACK monitor for g15 keyboards"""
41 pkg_data_files = [('share/pixmaps', ['data/ladilog.svg',
42 'data/laditray.svg',
43 'data/ladiconf.svg']),
44 ('share/laditools/data', ['data/laditools_logo.svg',
45 'data/ladilog_ui.ui',
46 'data/started.svg',
47 'data/starting.svg',
48 'data/stopped.svg'])]
49 pkg_scripts = ['laditray',
50 'g15ladi',
51 'wmladi',
52 'ladilog',
53 'ladiconf']
55 os.environ['XGETTEXT_ARGS'] = "--language=Python"
57 if not os.getenv("LADI_RELEASE") and \
58 os.path.isfile(get_commit_script):
59 commit = subprocess.check_output(["sh", get_commit_script]).strip()
60 laditools_version += "~" + commit
62 class clean_extra(clean_i18n.clean_i18n):
63 def run(self):
64 clean_i18n.clean_i18n.run(self)
66 for path, dirs, files in os.walk('.'):
67 for f in files:
68 f = os.path.join(path, f)
69 if f.endswith('.pyc'):
70 self.spawn(['rm', f])
71 for d in dirs:
72 if d == '__pycache__':
73 self.spawn(['rm', '-r', os.path.join(path,d)])
75 setup(name='laditools',
76 version=laditools_version,
77 author='Marc-Olivier Barre, Nedko Arnaudov and Alessio Treglia',
78 author_email='linux-audio-dev@lists.linuxaudio.org',
79 license='GPL-3',
80 url='https://launchpad.net/laditools',
81 download_url='https://launchpad.net/laditools/+download',
82 description=pkg_short_desc,
83 long_description=pkg_long_desc,
84 packages=['laditools', 'laditools.gtk'],
85 scripts=pkg_scripts,
86 data_files=pkg_data_files,
87 cmdclass={
88 'build' : build_extra.build_extra,
89 'build_i18n' : build_i18n.build_i18n,
90 'build_icons' : build_icons.build_icons,
91 'clean' : clean_extra}