~nataliabidart/ubuntuone-control-panel/subscribe

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: Tarmac
  • Author(s): Natalia B. Bidart
  • Date: 2010-11-10 20:29:04 UTC
  • mfrom: (19.1.3 really-fix-data-dir)
  • Revision ID: tarmac-20101110202904-w7mpzpzalvmyj6lw
Restoring the DATA_SUFFIX to the relative search of the data dir.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
SERVICE_FILE = 'com.ubuntuone.controlpanel.service'
35
35
CONSTANTS = 'ubuntuone/controlpanel/constants.py'
36
36
 
37
 
CLEANFILES = [SERVICE_FILE, CONSTANTS, POT_FILE]
 
37
CLEANFILES = [SERVICE_FILE, CONSTANTS, POT_FILE, 'MANIFEST']
 
38
 
 
39
 
 
40
def replace_prefix(prefix):
 
41
    """Replace every '@prefix@' with prefix within 'filename' content."""
 
42
    # replace .service file, DATA_DIR constant
 
43
    for filename in (SERVICE_FILE, CONSTANTS):
 
44
        with open(filename + '.in') as in_file:
 
45
            content = in_file.read()
 
46
            with open(filename, 'w') as out_file:
 
47
                out_file.write(content.replace('@prefix@', prefix))
38
48
 
39
49
 
40
50
class ControlPanelInstall(DistUtilsExtra.auto.install_auto):
47
57
        @prefix@ by self.prefix.
48
58
 
49
59
        """
50
 
        # replace .service file, DATA_DIR constant
51
 
        for filename in (SERVICE_FILE, CONSTANTS):
52
 
            with open(filename + '.in') as in_file:
53
 
                content = in_file.read()
54
 
                with open(filename, 'w') as out_file:
55
 
                    out_file.write(content.replace('@prefix@', self.prefix))
56
 
 
 
60
        replace_prefix(self.prefix)
57
61
        DistUtilsExtra.auto.install_auto.run(self)
58
62
 
59
63
 
79
83
    long_description='Application to manage a Ubuntu One account. Provides a'\
80
84
                     'DBus service to query/modify all the Ubuntu One bits.',
81
85
    url='https://launchpad.net/ubuntuone-control-panel',
82
 
    packages=['ubuntuone.controlpanel'],
 
86
    packages=['ubuntuone.controlpanel', 'ubuntuone.controlpanel.gtk'],
83
87
    data_files=[
84
88
        ('lib/ubuntuone-control-panel',
85
89
         ['bin/ubuntuone-control-panel-backend']),