Updated translations
[panucci.git] / setup.py
blobfee74ed0fa16803d6dd956a97bb7c08b14bbdd9f
1 #!/usr/bin/env python
3 # This file is part of Panucci.
4 # Copyright (c) 2008-2010 The Panucci Audiobook and Podcast Player Project
6 # Panucci is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # Panucci is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Panucci. If not, see <http://www.gnu.org/licenses/>.
20 from distutils.core import setup
21 from glob import glob
22 import os
23 import sys
25 sys.path.insert(0, 'src')
26 import panucci
28 running_on_tablet = os.path.exists('/etc/osso_software_version')
30 applications_dir = 'share/applications'
31 if running_on_tablet:
32 applications_dir += '/hildon'
34 data_files = [
35 ('share/panucci', glob('icons/*.png')),
36 (applications_dir, ['data/panucci.desktop']),
37 ('share/icons/hicolor/scalable/apps', ['data/panucci.png']),
40 # search for translations and repare to install
41 translation_files = []
42 for mofile in glob('data/locale/*/LC_MESSAGES/panucci.mo'):
43 modir = os.path.dirname(mofile).replace('data', 'share')
44 translation_files.append((modir, [mofile]))
46 if not len(translation_files) and not 'clean' in sys.argv:
47 print >>sys.stderr, """
48 Warning: No translation files. (Did you forget to run "make gen_gettext"?)
49 """
51 setup(name='Panucci',
52 version=panucci.__version__,
53 description='A Resuming Media Player',
54 author='Thomas Perl',
55 author_email='thp@gpodder.org',
56 url='http://panucci.garage.maemo.org/',
57 packages=['panucci', 'panucci.backends'],
58 package_dir={ '':'src' },
59 scripts=['bin/panucci'],
60 data_files=data_files + translation_files,