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

« back to all changes in this revision

Viewing changes to ivle/conf/conf.py

Merge from new-dispatch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
import ivle.config
33
33
 
34
34
try:
35
 
    conf = ivle.config.Config(plugins=False)
 
35
    conf = ivle.config.Config()
36
36
except ivle.config.ConfigError, e:
37
37
    raise ImportError(str(e))
38
38
 
43
43
    'prefix': 'paths/prefix',
44
44
    'data_path': 'paths/data',
45
45
    'log_path': 'paths/logs',
 
46
    'python_site_packages_override': 'paths/site_packages',
46
47
    'public_host': 'urls/public_host',
47
48
    'db_host': 'database/host',
48
49
    'db_port': 'database/port',
57
58
    'usrmgt_host': 'usrmgt/host',
58
59
    'usrmgt_port': 'usrmgt/port',
59
60
    'usrmgt_magic': 'usrmgt/magic',
60
 
 
61
 
    # These two are only relevant inside the jail.
62
 
    'login': 'user_info/login',
63
 
    'svn_pass': 'user_info/svn_pass',
 
61
    'forum_secret': 'plugins/forum/secret',
64
62
}
65
63
 
66
64
for legacyopt, newopt_path in CONFIG_OPTIONS.iteritems():
91
89
# Path where user-executable binaries are installed.
92
90
bin_path = os.path.join(prefix, 'bin')
93
91
 
 
92
# 'site-packages' directory in Python, where Python libraries are to be
 
93
# installed.
 
94
if python_site_packages_override is None:
 
95
    PYTHON_VERSION = sys.version[0:3]   # eg. "2.5"
 
96
    python_site_packages = os.path.join(prefix,
 
97
                               'lib/python%s/site-packages' % PYTHON_VERSION)
 
98
else:
 
99
    python_site_packages = python_site_packages_override
 
100
 
94
101
# In the local file system, where the student/user jails will be mounted.
95
102
# Only a single copy of the jail's system components will be stored here -
96
103
# all user jails will be virtually mounted here.
97
 
# XXX: Some jail code calls ivle.studpath.url_to_{local,jailpaths}, both
98
 
#      of which use jail_base. Note that they don't use the bits of the
99
 
#      return value that depend on jail_base, so it can be any string inside
100
 
#      the jail. The value computed here may be meaningless inside the jail,
101
 
#      but that's OK for now.
102
104
jail_base = os.path.join(data_path, 'jailmounts')
103
105
 
104
106
# In the local file system, where are the student/user file spaces located.
117
119
# (The 'subjects' and 'exercises' directories).
118
120
content_path = os.path.join(data_path, 'content')
119
121
 
 
122
# In the local file system, where are the per-subject file spaces located.
 
123
# The individual subject directories are expected to be located immediately
 
124
# in subdirectories of this location.
 
125
subjects_base = os.path.join(content_path, 'subjects')
 
126
 
 
127
# In the local file system, where are the subject-independent exercise sheet
 
128
# file spaces located.
 
129
exercises_base = os.path.join(content_path, 'exercises')
 
130
 
120
131
# In the local file system, where the system notices are stored (such as terms
121
132
# of service and MOTD).
122
133
notices_path = os.path.join(data_path, 'notices')