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

« back to all changes in this revision

Viewing changes to setup/util.py

Added config validation spec: ivle/config/ivle-spec.conf.
ivle.conf.conf: No longer needs to do the cast-to-int hack.
ivle.config: Runs against the validator (with a XXX problem).
setup.util: ivle-spec.conf is installed with a new whitelist.

Show diffs side-by-side

added added

removed removed

Lines of Context:
292
292
installlist_mimetypes = ['text/x-python', 'text/html',
293
293
    'application/x-javascript', 'application/javascript',
294
294
    'text/css', 'image/png', 'image/gif', 'application/xml']
 
295
# Filenames which will automatically be placed in the list by InstallList.
 
296
whitelist_filenames = ['ivle-spec.conf']
295
297
 
296
298
def build_list_py_files(dir, no_top_level=False):
297
299
    """Builds a list of all py files found in a directory and its
305
307
        filter_mutate(lambda x: x[0] != '.', dirnames)
306
308
        # All *.py files are added to the list
307
309
        pylist += [os.path.join(dirpath, item) for item in filenames
308
 
            if mimetypes.guess_type(item)[0] in installlist_mimetypes]
 
310
            if mimetypes.guess_type(item)[0] in installlist_mimetypes or
 
311
               item in whitelist_filenames]
309
312
    if no_top_level:
310
313
        for i in range(0, len(pylist)):
311
314
            _, pylist[i] = pylist[i].split(os.sep, 1)