File: setup.py

package info (click to toggle)
update-manager 0.42.2ubuntu22-11
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,908 kB
  • ctags: 753
  • sloc: python: 3,738; sh: 2,971; xml: 1,571; makefile: 690; ansic: 38
file content (78 lines) | stat: -rwxr-xr-x 2,517 bytes parent folder | download
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env python

from distutils.core import setup
import glob
import os

GETTEXT_NAME="update-manager"
HELPFILES = []
print "Setting up help files..."
for filepath in glob.glob("help/*"):
    lang = filepath[len("help/"):]
    print " Language: %s" % lang
    path_xml = "share/gnome/help/update-manager/" + lang
    path_figures = "share/gnome/help/update-manager/" + lang + "/figures/"
    HELPFILES.append((path_xml, (glob.glob("%s/*.xml" % filepath))))
    HELPFILES.append((path_figures, (glob.glob("%s/figures/*.png" % \
                                                filepath))))
HELPFILES.append(('share/omf/update-manager', glob.glob("help/*/*.omf")))

I18NFILES = []
for filepath in glob.glob("po/mo/*/LC_MESSAGES/*.mo"):
    lang = filepath[len("po/mo/"):]
    targetpath = os.path.dirname(os.path.join("share/locale",lang))
    I18NFILES.append((targetpath, [filepath]))

ICONS = []
for size in glob.glob("data/icons/*"):
    for category in glob.glob("%s/*" % size):
        icons = []
        for icon in glob.glob("%s/*" % category):
            icons.append(icon)
        ICONS.append(("share/icons/hicolor/%s/%s" % \
                      (os.path.basename(size), \
                       os.path.basename(category)), \
                       icons))
print ICONS


os.system("intltool-merge -d po data/update-manager.schemas.in"\
           " build/update-manager.schemas")


# HACK: make sure that the mo files are generated and up-to-date
os.system("cd po; make update-po")
# do the same for the desktop files
os.system("cd data; make")
# and channels
os.system("cd channels; make")
    
setup(name='update-manager',
      version='0.42.2',
      packages=[
                'SoftwareProperties',
                'UpdateManager',
                'UpdateManager.Common'
                ],
      scripts=[
               'software-properties',
               'update-manager'
               ],
      data_files=[
                  ('share/update-manager/glade',
                     glob.glob("data/*.glade")
                  ),
                  ('share/update-manager/channels',
                     glob.glob("channels/*")
                  ),
                  ('share/applications',
                     ["data/update-manager.desktop",
                      "data/software-properties.desktop"]
                  ),
                  ('share/gconf/schemas',
                  glob.glob("build/*.schemas")
                  ),
                  ] + I18NFILES + HELPFILES + ICONS,
      )