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

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: mattgiuca
  • Date: 2008-02-04 00:10:25 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:395
Tutorial: split subjects directory into subjects and problems.
    Subjects now contains only subject XML and worksheet XML files.
    Problems are in a separate directory hierarchy.
Setup / Conf: Added new option "problems_base". This is used by tutorial to
    find the problem sheets.
In sample, moved problems to a "problems" directory. Setup installer correctly
    installs all the problems in this directory to the correct sample place.

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
# In the local file system, where are the per-subject file spaces located.
180
180
# The individual subject directories are expected to be located immediately
181
181
# in subdirectories of this location."""))
 
182
config_options.append(ConfigOption("problems_base",
 
183
    "/home/informatics/problems",
 
184
    """Root directory where the problem directories (containing
 
185
subject-independent problem sheets) are stored (on the local file
 
186
system):""",
 
187
    """
 
188
# In the local file system, where are the subject-independent problem sheet
 
189
# file spaces located."""))
182
190
config_options.append(ConfigOption("public_host", "public.localhost",
183
191
    """Hostname which will cause the server to go into "public mode",
184
192
providing login-free access to student's published work:""",
377
385
Copy subjects/ to subjects directory (unless --nosubjects specified).
378
386
 
379
387
--nojail        Do not copy the jail.
380
 
--nosubjects    Do not copy the subjects.
 
388
--nosubjects    Do not copy the subjects and problems directories.
381
389
--dry | -n  Print out the actions but don't do anything."""
382
390
    elif operation == 'updatejails':
383
391
        print """sudo python setup.py updatejails [--dry|-n]
396
404
    list_www = build_list_py_files('www')
397
405
    list_console = build_list_py_files('console')
398
406
    list_subjects = build_list_py_files('subjects', no_top_level=True)
 
407
    list_problems = build_list_py_files('problems', no_top_level=True)
399
408
    # Make sure that the files generated by conf are in the list
400
409
    # (since listmake is typically run before conf)
401
410
    if "www/conf/conf.py" not in list_www:
430
439
# This is to install sample subjects and material.
431
440
list_subjects = """)
432
441
        writelist_pretty(file, list_subjects)
 
442
        file.write("""
 
443
# List of all installable files in problems directory.
 
444
# This is to install sample exercise material.
 
445
list_problems = """)
 
446
        writelist_pretty(file, list_problems)
433
447
 
434
448
        file.close()
435
449
    except IOError, (errno, strerror):
684
698
        # for all the students' jails).
685
699
        action_copytree('jail', os.path.join(jail_base, 'template'), dry)
686
700
    if not nosubjects:
687
 
        # Copy the subjects directory across
 
701
        # Copy the subjects and problems directories across
688
702
        action_copylist(install_list.list_subjects, subjects_base, dry,
689
703
            srcdir="./subjects")
 
704
        action_copylist(install_list.list_problems, problems_base, dry,
 
705
            srcdir="./problems")
690
706
 
691
707
    # Append IVLE path to ivle.pth in python site packages
692
708
    # (Unless it's already there)