~nataliabidart/ubuntuone-control-panel/better-to-translate

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Tarmac
  • Author(s): eric.casteleijn at canonical
  • Date: 2011-03-22 15:31:47 UTC
  • mfrom: (104.1.3 add-service)
  • Revision ID: tarmac-20110322153147-6qya0xirx9bu0ae5
Use the new service.in file in setup.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
POT_FILE = 'po/ubuntuone-control-panel.pot'
34
34
SERVICE_FILE = 'com.ubuntuone.controlpanel.service'
 
35
GUI_SERVICE_FILE = 'com.ubuntuone.controlpanel.gui.service'
35
36
MESSAGE_ENTRY = 'ubuntuone-control-panel'
36
37
CONSTANTS = 'ubuntuone/controlpanel/constants.py'
37
38
 
38
 
CLEANFILES = [SERVICE_FILE, MESSAGE_ENTRY, CONSTANTS, POT_FILE, 'MANIFEST']
 
39
CLEANFILES = [
 
40
    SERVICE_FILE, GUI_SERVICE_FILE, MESSAGE_ENTRY, CONSTANTS, POT_FILE,
 
41
    'MANIFEST']
39
42
 
40
43
 
41
44
def replace_prefix(prefix):
42
45
    """Replace every '@prefix@' with prefix within 'filename' content."""
43
46
    # replace .service file, DATA_DIR constant
44
 
    for filename in (SERVICE_FILE, MESSAGE_ENTRY, CONSTANTS):
 
47
    for filename in (SERVICE_FILE, GUI_SERVICE_FILE, MESSAGE_ENTRY, CONSTANTS):
45
48
        with open(filename + '.in') as in_file:
46
49
            content = in_file.read()
47
50
            with open(filename, 'w') as out_file:
90
93
    data_files=[
91
94
        ('lib/ubuntuone-control-panel',
92
95
         ['bin/ubuntuone-control-panel-backend']),
93
 
        ('share/dbus-1/services/', [SERVICE_FILE]),
 
96
        ('share/dbus-1/services/', [SERVICE_FILE, GUI_SERVICE_FILE]),
94
97
        ('share/indicators/messages/applications/', [MESSAGE_ENTRY]),
95
98
    ],
96
99
    cmdclass={