def test_compile(self): from compileapp import compile_application, remove_compiled_application import os for appname in ['welcome', 'admin', 'examples']: appname_path = os.path.join(os.getcwd(), 'applications', appname) compile_application(appname_path) remove_compiled_application(appname_path) return
def test_compile(self): #apps = ['welcome', 'admin', 'examples'] apps = ['welcome'] for appname in apps: appname_path = os.path.join(os.getcwd(), 'applications', appname) compile_application(appname_path) remove_compiled_application(appname_path) test_path = os.path.join(os.getcwd(), "%s.w2p" % appname) unpack_path = os.path.join(os.getcwd(), 'unpack', appname) w2p_pack(test_path, appname_path, compiled=True, filenames=None) w2p_pack(test_path, appname_path, compiled=False, filenames=None) w2p_unpack(test_path, unpack_path) return
def app_compile(app, request): """ Compiles the application Parameters ---------- app: application name request: the global request object """ from compileapp import compile_application, remove_compiled_application folder = apath(app, request) try: compile_application(folder) return True except (Exception, RestrictedError): remove_compiled_application(folder) return False
def app_compile(app, request): """ Compiles the application Parameters ---------- app: application name request: the global request object """ from compileapp import compile_application, remove_compiled_application folder = apath(app, request) try: compile_application(folder) return None except (Exception, RestrictedError): tb = traceback.format_exc(sys.exc_info) remove_compiled_application(folder) return tb
def app_compile(app, request): """Compiles the application Args: app(str): application name request: the global request object Returns: None if everything went ok, traceback text if errors are found """ from compileapp import compile_application, remove_compiled_application folder = apath(app, request) try: compile_application(folder) return None except (Exception, RestrictedError): tb = traceback.format_exc(sys.exc_info) remove_compiled_application(folder) return tb