summaryrefslogtreecommitdiff
path: root/trunk/setup.py
blob: efafd60971ea4017be7df85a7781d13ded6b3fc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# setup.py - distutils module for Dimbola
# Copyright (C) 2009  Lars Wirzenius <liw@liw.fi>
# 
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


from distutils.core import setup
from DistUtilsExtra.command import *

# We can't just import the dimbola package, since that would import
# gtk, which doesn't work without X, and we need to be able build
# even without X. Thus, we kludge.

import re
version = None
for line in file('dimbola/__init__.py'):
    m = re.match(r'^version = \'(?P<version>\d+\.\d+\.\d+)\'', line)
    if m:
        version = m.group('version')
assert version is not None


setup(name='dimbola',
      version=version,
      description='photo management',
      author='Lars Wirzenius',
      author_email='liw@liw.fi',
      packages=['dimbola', 'dimbola/plugins'],
      package_data={'dimbola': ['ui.ui', 'plugins/*.ui', 'NEWS.html']},
      scripts=['dimbola-gtk'],
      data_files=[
        ('share/applications', ['dimbola.desktop']),
        ('share/man/man1', ['dimbola-gtk.1']),
      ],
      cmdclass = { "build" : build_extra.build_extra,
                   "build_i18n" :  build_i18n.build_i18n,
                   "build_help" :  build_help.build_help,
                   "build_icons" :  build_icons.build_icons }
     )