Fix saving and loading on Maemo 5
[panucci.git] / setup.py
blob8b584779d1d02af15f0652d9e8eee61ade6f64ea
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
22 import glob
23 import os
24 import sys
26 SRC_DIR = 'src/'
28 d2p = lambda d: d[len(SRC_DIR):].replace('/', '.')
29 PACKAGES = [d2p(d) for d, dd, ff in os.walk(SRC_DIR) if '__init__.py' in ff]
31 SCRIPTS = glob.glob('bin/*')
33 DATA_FILES = [
34 ('share/panucci', glob.glob('icons/*.png')),
35 ('share/applications', ['data/panucci.desktop']),
36 ('share/icons/hicolor/scalable/apps', ['data/panucci.png']),
37 ('share/dbus-1/services', ['data/panucci.service']),
40 for mofile in glob.glob('data/locale/*/LC_MESSAGES/panucci.mo'):
41 modir = os.path.dirname(mofile).replace('data', 'share')
42 DATA_FILES.append((modir, [mofile]))
44 sys.path.insert(0, SRC_DIR)
45 import panucci
47 setup(
48 name='Panucci',
49 version=panucci.__version__,
50 description='Resuming audibook and podcast player',
51 author='Thomas Perl',
52 author_email='thp@gpodder.org',
53 url='http://panucci.garage.maemo.org/',
54 packages=PACKAGES,
55 package_dir={ '': SRC_DIR },
56 scripts=SCRIPTS,
57 data_files=DATA_FILES,