1- import paver
2- from paver.easy import *
3- import paver.setuputils
4- paver.setuputils.install_distutils_tasks ()
5- import os, sys
6- from runestone.server import get_dburl
7- from sphinxcontrib import paverutils
1+ import os
2+ import sys
83import pkg_resources
94from socket import gethostname
5+
6+ from paver.easy import options, Bunch
7+ import paver.setuputils
8+
109from runestone import get_master_url
10+ from runestone import build # NOQA: F401 -- build is called implicitly by the paver driver.
11+ from runestone.server import get_dburl
1112
13+ paver.setuputils.install_distutils_tasks ()
1214sys.path.append (os.getcwd ())
1315
1416# The project name, for use below.
@@ -24,33 +26,34 @@ serving_dir = "%(build_dir)s/" + project_name
2426dest = " %(dest)s"
2527
2628options(
27- sphinx = Bunch(docroot= " ." ,),
29+ sphinx= Bunch(docroot= " ." ,),
2830
29- build = Bunch(
31+ build= Bunch(
3032 builddir= serving_dir,
3133 sourcedir= " _sources" ,
3234 outdir= serving_dir,
3335 confdir= " ." ,
34- template_args= {'login_required':'%(login_req)s',
35- 'loglevel': %(log_level)d,
36- 'course_title': project_name,
37- 'python3': '%(python3)s',
38- 'dburl': '%(dburl)s',
39- 'default_ac_lang': '%(default_ac_lang)s',
40- 'jobe_server': 'http://jobe2.cosc.canterbury.ac.nz ',
41- 'proxy_uri_runs': '/jobe/index .php /restapi/runs/',
42- 'proxy_uri_files': '/jobe/index .php /restapi/files/',
43- 'downloads_enabled': '%(downloads_enabled)s',
44- 'enable_chatcodes': '%(enable_chatcodes)s',
45- 'allow_pairs': '%(allow_pairs)s',
46- 'dynamic_pages': %(dynamic_pages)s,
47- 'use_services': '%(use_services)s',
48- 'basecourse': project_name,
49- 'course_id': project_name,
50- # These are used for non-dynamic books.
51- 'appname': 'runestone',
52- 'course_url': master_url,
53- }
36+ template_args= {
37+ 'login_required': '%(login_req)s',
38+ 'loglevel': %(log_level)d,
39+ 'course_title': project_name,
40+ 'python3': '%(python3)s',
41+ 'dburl': '%(dburl)s',
42+ 'default_ac_lang': '%(default_ac_lang)s',
43+ 'jobe_server': 'http://jobe2.cosc.canterbury.ac.nz ',
44+ 'proxy_uri_runs': '/jobe/index .php /restapi/runs/',
45+ 'proxy_uri_files': '/jobe/index .php /restapi/files/',
46+ 'downloads_enabled': '%(downloads_enabled)s',
47+ 'enable_chatcodes': '%(enable_chatcodes)s',
48+ 'allow_pairs': '%(allow_pairs)s',
49+ 'dynamic_pages': %(dynamic_pages)s,
50+ 'use_services': '%(use_services)s',
51+ 'basecourse': project_name,
52+ 'course_id': project_name,
53+ # These are used for non-dynamic books.
54+ 'appname': 'runestone',
55+ 'course_url': master_url,
56+ }
5457 )
5558)
5659
@@ -65,5 +68,3 @@ options.build.template_args['runestone_version'] = version
6568
6669# If DBURL is in the environment override dburl
6770options.build.template_args ['dburl'] = get_dburl(outer= locals())
68-
69- from runestone import build # build is called implicitly by the paver driver.
0 commit comments