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

« back to all changes in this revision

Viewing changes to setup/util.py

ivle.webapp.filesystem.svnlog: Port www/apps/svnlog to new framework. As with
    ivle.webapp.filesystem.diff, this involves moving things around and
    making services/svnlogservice return JSON.

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
 
           'make_install_path', 'wwwuid']
 
40
           '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
 
 
325
314
class InstallList(object):
326
315
    # We build two separate lists, by walking www and console
327
316
    list_www = property(lambda self: build_list_py_files('www'))
342
331
        "services/usrmgt-server",
343
332
        "services/diffservice",
344
333
        "services/svnlogservice",
345
 
        "services/usrmgt-server", # XXX: Should be in bin/
346
334
    ]
347
335
 
348
336
    list_user_binaries = [
354
342
        "bin/ivle-mountallusers",
355
343
        "bin/ivle-remakeuser",
356
344
        "bin/ivle-showenrolment",
357
 
        "bin/ivle-buildjail",
358
345
    ]