~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to setup/util.py

Replaced Python config files (conf.py) with new config files system, using
    configobj (INI-file style config files).

setup.py config now produces ./etc/ivle.conf, a new-style config file.
ivle/conf/conf.py is now part of the IVLE source code. It reads the new config
file and provides the same legacy interface, so all of IVLE still functions,
including setup.py config.

Added /etc to the source tree (config files will be stored here).
Added configobj as a dependency in doc/setup/install_proc.txt.

setup.py install copies ./etc/ivle.conf into /etc/ivle/ivle.conf.

Removed boilerplate code generation from setup/configure.py (that code is now
part of ivle/conf/conf.py which is now in the source tree).

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
           'action_symlink', 'action_append', 'action_chown',
38
38
           'action_chown_setuid', 'action_chmod_x', 'action_make_private',
39
39
           'query_user', 'filter_mutate', 'get_svn_revision', 'InstallList',
40
 
           'wwwuid']
 
40
           'make_install_path', 'wwwuid']
41
41
 
42
42
# Determine which Python version (2.4 or 2.5, for example) we are running,
43
43
# and use that as the filename to the Python directory.
311
311
            _, pylist[i] = pylist[i].split(os.sep, 1)
312
312
    return pylist
313
313
 
 
314
def make_install_path(rootdir, path):
 
315
    '''Combine an installation root directory and final install path.
 
316
 
 
317
    Normalises path, and joins it to the end of rootdir, removing the leading
 
318
    / to make it relative if required.
 
319
    '''
 
320
    normpath = os.path.normpath(path)
 
321
    if normpath.startswith(os.sep):
 
322
        normpath = normpath[1:]
 
323
    return os.path.join(rootdir, normpath)
 
324
 
314
325
class InstallList(object):
315
326
    # We build two separate lists, by walking www and console
316
327
    list_www = property(lambda self: build_list_py_files('www'))
331
342
        "services/usrmgt-server",
332
343
        "services/diffservice",
333
344
        "services/svnlogservice",
 
345
        "services/usrmgt-server", # XXX: Should be in bin/
334
346
    ]
335
347
 
336
348
    list_user_binaries = [
342
354
        "bin/ivle-mountallusers",
343
355
        "bin/ivle-remakeuser",
344
356
        "bin/ivle-showenrolment",
 
357
        "bin/ivle-buildjail",
345
358
    ]