File: setup.py

package info (click to toggle)
galternatives 0.13.4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 264 kB
  • ctags: 111
  • sloc: python: 549; sh: 37; ansic: 31; makefile: 11
file content (39 lines) | stat: -rw-r--r-- 1,382 bytes parent folder | download | duplicates (6)
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
#!/usr/local/bin/python

import os, sys

from distutils.core import setup
import galternatives
from galternatives.common import VERSION

data = [ ('bin', ['galternatives/galternatives']),
         ('share/pixmaps', ['pixmaps/galternatives.png']),
         ('share/galternatives', ['galternatives.glade']),
         ('share/galternatives/descriptions', ['descriptions/x-terminal-emulator.control']) ]

if sys.argv[1] == 'build' or sys.argv[1] == 'install':
    curdir = os.getcwd ()
    os.chdir ('%s/translations' % (curdir))
    os.system ('./update-translations.sh')

    pipe = os.popen ('./list-mos.sh')
    while True:
        line = pipe.readline ().strip ()
        if line == '':
            break
        data.append (('share/locale/%s/LC_MESSAGES' % (line), ['translations/%s/galternatives.mo' % (line)]))
    pipe.close ()
    print data
    os.chdir (curdir)

if __name__ == '__main__' :
    setup(name                  = "galternatives",
          version               = VERSION,
          license               = "GPL",
          description           = "Manager for the alternatives system",
          author                = "Gustavo Noronha Silva",
          author_email          = "kov@debian.org",
          url                   = "http://galternatives.alioth.debian.org/",
          packages              = [ 'galternatives' ],
          data_files		= data)