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

« back to all changes in this revision

Viewing changes to setup/build.py

Remove the setup.configure import from setup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    parser.add_option("--no-compile",
44
44
        action="store_true", dest="nocompile",
45
45
        help="Don't byte-compile .py files.")
46
 
    parser.add_option("-t", "--trampoline-uids",
47
 
        action="store", dest="tuids", default="33",
48
 
        help="Comma-separated list of UIDs allowed to use trampoline. "
49
 
             "(default: 33)")
50
46
    (options, args) = parser.parse_args(args)
51
47
 
52
48
    # Call the real function
53
 
    return __build(options.dry, options.nocompile, options.tuids)
 
49
    return __build(options.dry, options.nocompile)
54
50
 
55
 
def __build(dry=False, no_compile=None, tuids=None):
 
51
def __build(dry=False, no_compile=None):
56
52
    install_list = util.InstallList()
57
53
 
58
54
    if dry:
59
55
        print "Dry run (no actions will be executed)\n"
60
56
 
61
 
    # Create trampoline configuration.
62
 
    conf_hfile = os.path.join(os.getcwd(), "bin/trampoline/conf.h")
63
 
    conf_h = open(conf_hfile, "w")
64
 
 
65
 
    conf_h.write("""/* IVLE Configuration File
66
 
 * conf.h
67
 
 * Administrator settings required by trampoline.
68
 
 * Note: trampoline will have to be rebuilt in order for changes to this file
69
 
 * to take effect.
70
 
 */
71
 
 
72
 
#define IVLE_AUFS_JAILS
73
 
 
74
 
/* Which user IDs are allowed to run the trampoline.
75
 
 * This list should be limited to the web server user.
76
 
 * (Note that root is an implicit member of this list).
77
 
 */
78
 
static const int allowed_uids[] = { %s };
79
 
""" % tuids)
80
 
    conf_h.close()
81
 
 
82
57
    # Compile the trampoline
83
58
    curdir = os.getcwd()
84
59
    os.chdir('bin/trampoline')
93
68
 
94
69
    # Compile .py files into .pyc or .pyo files
95
70
    if not no_compile:
 
71
        compileall.compile_dir('www', quiet=True)
96
72
        compileall.compile_dir('ivle', quiet=True)
97
73
        compileall.compile_dir('services', quiet=True)
98
74