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/>.
26 from distutils
.core
import setup
27 from distutils
.command
.clean
import clean
28 from DistUtilsExtra
.command
import *
30 laditools_version
= "1.0~rc8"
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',
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
):
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'
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
):
83 clean_i18n
.clean_i18n
.run(self
)
85 for path
, dirs
, files
in os
.walk('.'):
87 f
= os
.path
.join(path
, f
)
88 if f
.endswith('.pyc'):
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'):
98 self
.spawn(['rm', '-r', os
.path
.join(path
,d
)])
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',
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'],
112 data_files
=pkg_data_files
,
114 'build' : build_extra
.build_extra
,
115 'build_i18n' : build_i18n
.build_i18n
,
116 'build_icons' : build_icons_extra
,
117 'clean' : clean_extra
}