diff --git a/src/scielo/bin/cfg/version.txt b/src/scielo/bin/cfg/version.txt index 67fa4af08..709ac5537 100644 --- a/src/scielo/bin/cfg/version.txt +++ b/src/scielo/bin/cfg/version.txt @@ -1,5 +1,5 @@ -4.0.095 Teste 29/03/2018 -======================== +4.0.095 29/03/2018 +================== - Installation with proxy - Markup XML diff --git a/src/scielo/bin/xml/app_modules/__init__.py b/src/scielo/bin/xml/app_modules/__init__.py index 8899b3b80..2fa0b10b8 100644 --- a/src/scielo/bin/xml/app_modules/__init__.py +++ b/src/scielo/bin/xml/app_modules/__init__.py @@ -1,29 +1,29 @@ # coding=utf-8 import os -try: - from app_modules.app.config import app_texts -except Exception as e: - print(e) - from .app.config import app_texts - -try: - from app_modules.app.config import app_caller -except Exception as e: - print(e) - from .app.config import app_caller try: - from app_modules.generics import logger -except Exception as e: - print(e) - from .generics import logger + from app_modules.app.config import ( + app_texts, + app_caller, + ) + from app_modules.generics import ( + logger, + encoding, + system, + ) -try: - from app_modules.generics import encoding except Exception as e: print(e) - from .generics import encoding + from .app.config import ( + app_texts, + app_caller, + ) + from .generics import ( + logger, + encoding, + system, + ) THIS_FILE_LOCATION = os.path.dirname(os.path.realpath(__file__)).replace('\\', '/') @@ -31,7 +31,7 @@ INVALID_APP_PATH = not str(THIS_LOCATION) == THIS_FILE_LOCATION -BIN_PATH = THIS_LOCATION + '/../..' +BIN_PATH = os.path.dirname(os.path.dirname(THIS_LOCATION)) BIN_XML_PATH = BIN_PATH + '/xml' JAR_PATH = BIN_PATH + '/jar' RELATIVE_JAR_PATH = JAR_PATH.replace(BIN_PATH, './..') @@ -66,9 +66,3 @@ os.unlink(LOG_PATH+'/app_caller.log') except: pass - - -appcaller = app_caller.AppCaller( - logger.get_logger(LOG_PATH+'/app_caller.log', 'Environment'), - VENV_PATH, - REQUIREMENTS_FILE) diff --git a/src/scielo/bin/xml/app_modules/app/config/app_caller.py b/src/scielo/bin/xml/app_modules/app/config/app_caller.py index 1841fe477..89a7ceac8 100644 --- a/src/scielo/bin/xml/app_modules/app/config/app_caller.py +++ b/src/scielo/bin/xml/app_modules/app/config/app_caller.py @@ -6,6 +6,9 @@ from ...generics import encoding +# proxy_data = system.proxy_data(configuration.proxy_info) + + so, node, release, version, machine, processor = platform.uname() python_version = platform.python_version() so = so.lower() @@ -64,16 +67,20 @@ def register_commands(self): return commands +def gen_proxy_info(proxy_server_port): + return ProxyInfo(system.proxy_data(proxy_server_port)) + + class VirtualEnv(object): - def __init__(self, logger, venv_path, requirements_filename): + def __init__(self, logger, venv_path): + encoding.debugging('VirtualEnv.VirtualEnv()') self.logger = logger self.path = venv_path - self.requirements = Requirements(requirements_filename) - self.proxy = ProxyInfo(None) self.setUp() def setUp(self): + encoding.debugging('VirtualEnv.setUp') if 'windows' in so: self.activate_filename = u'{}/Scripts/activate.bat'.format(self.path) self.activate_command = u'call "{}"'.format(self.activate_filename) @@ -88,28 +95,36 @@ def setUp(self): self.activate_command = '' self.deactivate_command = '' + def inform_status(self): + encoding.debugging('VirtualEnv.inform_status') + if self.installed is False: + inform(u'Not found: "{}"'.format(self.activate_filename)) + @property def installed(self): - status = os.path.isfile(self.activate_filename) - if status is False: - inform(u'Missing virtualenv: "{}"'.format(self.activate_filename)) - return status + encoding.debugging('VirtualEnv.installed') + return os.path.isfile(self.activate_filename) - def install_venv(self): + def install_venv(self, recreate, proxy_info): + encoding.debugging('VirtualEnv.install_venv') if self.path is not None: - if not self.installed: + if not self.installed or recreate: commands = [] - commands.extend(self.proxy.register_commands) + commands.extend(proxy_info.register_commands) + commands.append( + 'python -m pip install {} -U pip'.format( + proxy_info.parameter) + ) commands.append( 'python -m pip install {} --upgrade pip'.format( - self.proxy.parameter) + proxy_info.parameter) ) commands.append( - 'pip install {} virtualenv'.format(self.proxy.parameter) + 'pip install {} virtualenv'.format(proxy_info.parameter) ) commands.append(u'virtualenv "{}"'.format(self.path)) for cmd in commands: - if 'teste' in self.proxy.parameter: + if 'teste' in proxy_info.parameter: encoding.display_message('Executaria\n {}'.format(cmd)) else: system.run_command(cmd) @@ -120,55 +135,26 @@ def install_venv(self): inform(u'Unable to create the virtualenv: "{}"'.format(self.path)) inform('Install the programs in a path which does not have diacritics') - def install_requirements(self): - commands = self.requirements.install_commands( - self.proxy, - uninstall=True) - self.execute_in_virtualenv(commands) - - def execute_in_virtualenv(self, commands): - self.install_venv() - if self.installed: - _commands = [self.activate_command] - _commands.extend(commands) - self._execute_inline(_commands) - - def _execute_inline(self, commands): - _commands = [item for item in commands if len(item) > 0] - cmd = self.sep.join(_commands) - display_cmd = self.proxy.hide_password(cmd) - self.logger.info(display_cmd) - if 'teste' in cmd: - encoding.display_message('Executaria\n {}'.format(cmd)) - else: - encoding.display_message(display_cmd) - system.run_command(cmd, False) - - def activate(self): - if self.installed: - system.run_command(self.activate_command, True) - - def deactivate(self): - if self.installed: - system.run_command(self.deactivate_command, True) - class Requirements(object): def __init__(self, requirements_file): self.requirements_file = requirements_file - def install_commands(self, proxy, uninstall): + def install_commands(self, proxy_info, uninstall): commands = [] if uninstall is True: commands = self.uninstall_commands() - commands.extend(proxy.register_commands) + commands.append( + 'python -m pip install {} -U pip'.format( + proxy_info.parameter) + ) commands.append( 'python -m pip install {} --upgrade pip'.format( - proxy.parameter) + proxy_info.parameter) ) commands.append(u'pip install {} -r "{}"'.format( - proxy.parameter, self.requirements_file)) + proxy_info.parameter, self.requirements_file)) commands.append('pip freeze > python_libraries_installed.txt') return commands @@ -181,28 +167,70 @@ def uninstall_commands(self): class AppCaller(object): - def __init__(self, logger, venv_path, req_file): - self.venv = VirtualEnv(logger, venv_path, req_file) - - @property - def proxy(self): - return self.venv.proxy - - @proxy.setter - def proxy(self, value): - self.venv.proxy = ProxyInfo(value) - - def install_virtualenv(self, recreate=False): - inform('Install virtualenv') - self.venv.install_venv() - if self.venv.installed: - inform('Install virtualenv: done!') - - def install_requirements(self): - if self.venv.installed: - inform('Install Requirements') - self.venv.install_requirements() - #inform('Install Requirements: done!') + def __init__(self, logger, venv_path, req_file, proxy_server_port): + encoding.debugging('AppCaller.AppCaller()') + self.logger = logger + self.venv = VirtualEnv(logger, venv_path) + self.requirements = Requirements(req_file) + self.proxy_server_port = proxy_server_port + self.proxy_info = ProxyInfo(None) + + def install_requirements(self, restart, requirements_checker): + encoding.debugging( + 'AppCaller.install_requirements', + (restart, requirements_checker)) + reqs = 0 + if requirements_checker is not None: + reqs = requirements_checker() + encoding.debugging( + 'AppCaller.install_requirements', + (reqs, restart)) + if restart or reqs > 0: + self.proxy_info = gen_proxy_info(self.proxy_server_port) + if restart or not self.venv.installed: + encoding.debugging( + 'AppCaller.install_requirements: self.venv.install_venv') + self.venv.install_venv(restart, self.proxy_info) + encoding.debugging( + 'AppCaller.install_requirements: self.requirements.install_commands') + commands = self.requirements.install_commands( + self.proxy_info, + uninstall=restart) + + self.execute(commands) + + def format_commands(self, commands): + encoding.debugging('AppCaller.format_commands', commands) + _commands = [] + for cmd in commands: + _cmd = [] + if self.venv.installed: + _cmd = [self.venv.activate_command] + if self.proxy_info.parameter in cmd: + _cmd.extend(self.proxy_info.register_commands) + _cmd.append(cmd) + if self.venv.installed: + # _cmd.append(self.venv.deactivate_command) + _cmd = [self.commands_inline(_cmd)] + _commands.extend(_cmd) + encoding.debugging('AppCaller.format_commands: formatted', _commands) + return _commands + + def commands_inline(self, commands): + encoding.debugging('AppCaller.commands_inline', commands) + _commands = [item for item in commands if len(item) > 0] + _cmd = self.venv.sep.join(_commands) + return _cmd def execute(self, commands): - self.venv.execute_in_virtualenv(commands) + encoding.debugging( + 'AppCaller.execute', + commands) + for cmd in self.format_commands(commands): + encoding.debugging( + 'AppCaller.execute', + cmd) + display_cmd = self.proxy_info.hide_password(cmd) + self.logger.info(display_cmd) + encoding.display_message(display_cmd) + os.system(cmd) diff --git a/src/scielo/bin/xml/app_modules/app/config/config.py b/src/scielo/bin/xml/app_modules/app/config/config.py index afbe4ed63..dd1306714 100644 --- a/src/scielo/bin/xml/app_modules/app/config/config.py +++ b/src/scielo/bin/xml/app_modules/app/config/config.py @@ -454,5 +454,9 @@ def coded_table_required(self): def BLOCK_DISAGREEMENT_WITH_COLLECTION_CRITERIA(self): return self.is_activated('BLOCK_DISAGREEMENT_WITH_COLLECTION_CRITERIA') + @property + def USE_VIRTUAL_ENV(self): + return self.is_activated('USE_VIRTUAL_ENV') + def is_activated(self, label, default='TRUE'): return self._data.get(label, default).upper() in ['ON', 'TRUE', 'YES'] diff --git a/src/scielo/bin/xml/app_modules/app/pkg_processors/pkg_processors.py b/src/scielo/bin/xml/app_modules/app/pkg_processors/pkg_processors.py index 983ab253a..3dc6673e0 100644 --- a/src/scielo/bin/xml/app_modules/app/pkg_processors/pkg_processors.py +++ b/src/scielo/bin/xml/app_modules/app/pkg_processors/pkg_processors.py @@ -386,8 +386,16 @@ def normalized_package(self, xml_list): return package.Package(pkgfiles, outputs, workarea_path) def evaluate_package(self, pkg): + encoding.display_message(_('Evaluating package... Wait. ')) + encoding.debugging('pkg_processors.make_package.evaluate_package - begin') registered_issue_data = registered.RegisteredIssue() + + encoding.display_message(_('Evaluating package... Wait. ')) + encoding.debugging('pkg_processors.make_package.evaluate_package - get_registered_issue_data') self.registered_issues_manager.get_registered_issue_data(pkg.issue_data, registered_issue_data) + + encoding.display_message(_('Evaluating package... Wait. ')) + encoding.debugging('pkg_processors.make_package.evaluate_package - affiliations') for xml_name in sorted(pkg.articles.keys()): a = pkg.articles[xml_name] if a is not None: @@ -397,12 +405,28 @@ def evaluate_package(self, pkg): institutions_results[aff_xml.id] = self.aff_normalizer.query_institutions(aff_xml) pkg.articles[xml_name].institutions_query_results = institutions_results pkg.articles[xml_name].normalized_affiliations = {aff_id: info[0] for aff_id, info in institutions_results.items()} + + encoding.display_message(_('Evaluating package... Wait. ')) + encoding.debugging('pkg_processors.make_package.evaluate_package - validate_pkg_articles') pkg_validations = self.validate_pkg_articles(pkg, registered_issue_data) + encoding.display_message(_('Evaluating package... Wait. ')) + encoding.debugging('pkg_processors.make_package.evaluate_package - validate_merged_articles') articles_mergence = self.validate_merged_articles(pkg, registered_issue_data) + + encoding.display_message(_('Evaluating package... Wait. ')) + encoding.debugging('pkg_processors.make_package.evaluate_package - PkgArticlesValidationsReports') pkg_reports = pkg_articles_validations.PkgArticlesValidationsReports(pkg_validations, registered_issue_data.articles_db_manager is not None) + + encoding.display_message(_('Evaluating package... Wait. ')) + encoding.debugging('pkg_processors.make_package.evaluate_package - MergedArticlesReports') mergence_reports = merged_articles_validations.MergedArticlesReports(articles_mergence, registered_issue_data) + + encoding.display_message(_('Evaluating package... Wait. ')) + encoding.debugging('pkg_processors.make_package.evaluate_package - IssueArticlesValidationsReports') validations_reports = merged_articles_validations.IssueArticlesValidationsReports(pkg_reports, mergence_reports, self.is_xml_generation) + encoding.display_message(_('Evaluating package... Wait. ')) + encoding.debugging('pkg_processors.make_package.evaluate_package - end') return registered_issue_data, validations_reports def make_package(self, pkg, GENERATE_PMC=False): @@ -447,6 +471,7 @@ def validate_merged_articles(self, pkg, registered_issue_data): pkg.articles, self.is_db_generation) def report_result(self, pkg, validations_reports, conversion=None): + encoding.debugging('pkg_processors.make_package.report_result - begin') files_location = workarea.AssetsDestinations(pkg.wk.scielo_package_path, pkg.issue_data.acron, pkg.issue_data.issue_label) if conversion is not None: files_location = workarea.AssetsDestinations(pkg.wk.scielo_package_path, pkg.issue_data.acron, pkg.issue_data.issue_label, self.config.serial_path, self.config.local_web_app_path, self.config.web_app_site) @@ -460,6 +485,7 @@ def report_result(self, pkg, validations_reports, conversion=None): for article_files in pkg.package_folder.pkgfiles_items.values(): # copia os xml para report path article_files.copy_xml(reports.files_location.report_path) + encoding.debugging('pkg_processors.make_package.report_result - end') return reports def make_pmc_package(self, pkg, GENERATE_PMC): diff --git a/src/scielo/bin/xml/app_modules/app/validations/article_content_validations.py b/src/scielo/bin/xml/app_modules/app/validations/article_content_validations.py index 2d8ad9134..6f69ddf1c 100644 --- a/src/scielo/bin/xml/app_modules/app/validations/article_content_validations.py +++ b/src/scielo/bin/xml/app_modules/app/validations/article_content_validations.py @@ -293,9 +293,11 @@ def article_type(self): ' ; '.join(invalid))) titles = [t.title for t in self.article.titles] _titles = ' / '.join([u'"{}"'.format(t) for t in titles]) - if utils.is_similar(self.article.toc_section, titles): + similar = utils.is_similar(self.article.toc_section, titles) + similar_alt = utils.is_similar_alternative(self.article.toc_section, titles) + if similar and similar_alt: errors.append( - _(u'{} must not be similar to the table of contents section "{}" '.format( + _(u'"{}" must not be similar to the table of contents section "{}" '.format( _titles, self.article.toc_section))) else: errors.append( diff --git a/src/scielo/bin/xml/app_modules/app/xpm.py b/src/scielo/bin/xml/app_modules/app/xpm.py index 123009322..164863dea 100644 --- a/src/scielo/bin/xml/app_modules/app/xpm.py +++ b/src/scielo/bin/xml/app_modules/app/xpm.py @@ -124,17 +124,20 @@ def display_form(self): interface.display_form(self.proc.stage == 'xc', None, self.call_make_package) def call_make_package(self, xml_path, GENERATE_PMC=False): - encoding.display_message(_('Making package') + '...') + encoding.display_message(_('Execute Make package') + ':') xml_list = [xml_path + '/' + item for item in os.listdir(xml_path) if item.endswith('.xml')] - encoding.display_message('...'*2) + encoding.display_message('Step 1/2 ...') normalized_pkgfiles, outputs = pkg_processors.normalize_xml_packages(xml_list, 'remote', self.proc.stage) - encoding.display_message('...'*3) + encoding.display_message('Step 2/2 ...') self.make_package(normalized_pkgfiles, outputs, GENERATE_PMC) - encoding.display_message('...'*4) + encoding.display_message('The End') return 'done', 'blue' def make_package(self, normalized_pkgfiles, outputs, GENERATE_PMC=False): if len(normalized_pkgfiles) > 0: workarea_path = os.path.dirname(normalized_pkgfiles[0].path) + encoding.debugging('xpm.XPM_Reception.make_package - package.Package') pkg = package.Package(normalized_pkgfiles, outputs, workarea_path) + encoding.debugging('xpm.XPM_Reception.make_package - proc.make_package') + encoding.display_message(_('Making package') + ' ...') self.proc.make_package(pkg, GENERATE_PMC) diff --git a/src/scielo/bin/xml/app_modules/generics/encoding.py b/src/scielo/bin/xml/app_modules/generics/encoding.py index 8025eab5a..96792b85a 100644 --- a/src/scielo/bin/xml/app_modules/generics/encoding.py +++ b/src/scielo/bin/xml/app_modules/generics/encoding.py @@ -100,7 +100,7 @@ def report_exception(function_name, e, data): app_logger.info(e) -def debugging(function_name, data): +def debugging(function_name, data=None): try: app_logger.info('DEBUG: {}'.format(function_name)) app_logger.info(data) diff --git a/src/scielo/bin/xml/app_modules/generics/system.py b/src/scielo/bin/xml/app_modules/generics/system.py index 25e2d87b9..1eeb41a2f 100644 --- a/src/scielo/bin/xml/app_modules/generics/system.py +++ b/src/scielo/bin/xml/app_modules/generics/system.py @@ -61,9 +61,9 @@ def proxy_parameter(proxy_info): def proxy_data(proxy_info): proxy = None if proxy_info is not None: - resp = read_input('Do you use proxy for Internet access ({})? Y/N '.format(proxy_info)) - if resp in 'Yy': - username = read_input('Inform proxy Username: ') + print('Proxy {}'.format(proxy_info)) + username = read_input('Username: ') + if username.strip() != '': password = input_password() proxy = [ username, @@ -90,5 +90,5 @@ def command_proxy_parameter(command): def proxy_password(param): if ':' in param and '@' in param: p = param[param.find(':'):] - p = p[:p.find('@')+1] + p = p[:p.rfind('@')+1] return p diff --git a/src/scielo/bin/xml/app_modules/generics/utils.py b/src/scielo/bin/xml/app_modules/generics/utils.py index 1cb98fb7c..afd01e165 100644 --- a/src/scielo/bin/xml/app_modules/generics/utils.py +++ b/src/scielo/bin/xml/app_modules/generics/utils.py @@ -35,6 +35,15 @@ def is_similar(text, items, min_rate=0.8): return (highiest_rate > min_rate) +def is_similar_alternative(text, items, min_rate=0.8): + if not isinstance(items, list): + items = [items] + lens = [len(item) for item in items] + lens.append(len(text)) + min_len = min(lens) + return is_similar(text, [item[:min_len-2] for item in items], 0.95) + + def how_similar(this, that): if this is None: this = 'None' diff --git a/src/scielo/bin/xml/app_modules/generics/ws/ws_proxy.py b/src/scielo/bin/xml/app_modules/generics/ws/ws_proxy.py index 063b343ad..27b27e118 100644 --- a/src/scielo/bin/xml/app_modules/generics/ws/ws_proxy.py +++ b/src/scielo/bin/xml/app_modules/generics/ws/ws_proxy.py @@ -35,6 +35,7 @@ def __init__(self, server=None, port=None, user=None, password=None): self.port = port self.user = user self.password = password + encoding.debugging('ProxyInfo({}, {}, {}, {})'.format(server, port, user, '*')) @property def handler_data(self): diff --git a/src/scielo/bin/xml/app_modules/generics/ws/ws_proxy_gui.py b/src/scielo/bin/xml/app_modules/generics/ws/ws_proxy_gui.py index 2349b377f..1282309a3 100644 --- a/src/scielo/bin/xml/app_modules/generics/ws/ws_proxy_gui.py +++ b/src/scielo/bin/xml/app_modules/generics/ws/ws_proxy_gui.py @@ -7,9 +7,16 @@ print('no Tkinter') +def gettext(text): + return text + + +_ = gettext + + class ProxyGUI(tk.Frame): - def __init__(self, tk_root, registered_ip, registered_port): + def __init__(self, tk_root, registered_ip, registered_port, debug): self.info = None if registered_ip is None: registered_ip = '' @@ -22,15 +29,26 @@ def __init__(self, tk_root, registered_ip, registered_port): message_frame = tk.Frame(self) message_frame.pack(fill="both", expand="yes") - message = tk.Message(message_frame, - font='System 14 bold', - text=_("""This tool requires Internet access for some services, - such as DOI, affiliations, and other data validations, - and also to get journals data from SciELO.\n - If you do not use a proxy to access the Internet, - and click on Cancel button."""), - wraplength=450 - ) + try: + message = tk.Message(message_frame, + font='System 14 bold', + text=_("""This tool requires Internet access for some services, + such as DOI, affiliations, and other data validations, + and also to get journals data from SciELO.\n + If you do not use a proxy to access the Internet, + and click on Cancel button."""), + wraplength=450 + ) + except: + message = tk.Message(message_frame, + font='System 14 bold', + text=_("""This tool requires Internet access for some services, + such as DOI, affiliations, and other data validations, + and also to get journals data from SciELO.\n + If you do not use a proxy to access the Internet, + and click on Cancel button.""") + ) + message.pack() proxy_ip_frame = tk.Frame(self) diff --git a/src/scielo/bin/xml/app_modules/generics/ws/ws_requester.py b/src/scielo/bin/xml/app_modules/generics/ws/ws_requester.py index a56cec741..5b96b4e57 100644 --- a/src/scielo/bin/xml/app_modules/generics/ws/ws_requester.py +++ b/src/scielo/bin/xml/app_modules/generics/ws/ws_requester.py @@ -86,6 +86,7 @@ def try_request(url, timeout=30, debug=False, force_error=False): class WebServicesRequester(object): def __init__(self, active=True, proxy_data=None): + encoding.debugging('WebServicesRequester({}, {})'.format(active, proxy_data)) self.requests = {} self.skip = [] self.proxy_data = proxy_data @@ -109,6 +110,8 @@ def format_url(self, url, parameters=None): return url + query def request(self, url, timeout=30, debug=False, force_error=False): + encoding.debugging('WebServicesRequester.request({})'.format(url)) + if self.active is False: return None response = self.requests.get(url) diff --git a/src/scielo/bin/xml/run_app.py b/src/scielo/bin/xml/run_app.py index e49ba5f83..115f40dfb 100644 --- a/src/scielo/bin/xml/run_app.py +++ b/src/scielo/bin/xml/run_app.py @@ -1,10 +1,30 @@ import sys -from app_modules.generics import encoding -from app_modules.generics import system -from app_modules.__init__ import appcaller -from app_modules.__init__ import BIN_XML_PATH -from app_modules.app.config import config +from app_modules.generics import ( + encoding, + system, + logger, +) +from app_modules.app.config import ( + app_caller, + config, +) +from app_modules.__init__ import ( + BIN_XML_PATH, + LOG_PATH, + VENV_PATH, + REQUIREMENTS_FILE, +) + + +configuration = config.Configuration() + +appcaller = app_caller.AppCaller( + logger.get_logger(LOG_PATH+'/app_caller.log', 'Environment'), + VENV_PATH if configuration.USE_VIRTUAL_ENV is True else None, + REQUIREMENTS_FILE, + configuration.proxy_info +) def execute(parameters): @@ -29,8 +49,13 @@ def requirements_checker(): def check_requirements(): reqs = requirements_checker() if len(reqs) > 0: - appcaller.install_virtualenv() - appcaller.install_requirements() + encoding.display_message( + '#########\nChecking requirements:\n{}\n########'.format( + '\n'.join(reqs) + ) + ) + encoding.debugging('run_app.py: check_requirements()') + appcaller.install_requirements(False, requirements_checker) def main(parameters): @@ -38,6 +63,7 @@ def main(parameters): argv = parameters[1:] if parameters[1].endswith('xml_package_maker.py'): + encoding.debugging('run_app.py: xpm') check_requirements() from app_modules.app import xpm xpm.call_make_packages(argv, '1.1') @@ -46,15 +72,15 @@ def main(parameters): from app_modules.app import xc xc.call_converter(argv, '1.1') elif parameters[1] == 'install': - configuration = config.Configuration() - proxy_info = configuration.proxy_info - appcaller.proxy = system.proxy_data(proxy_info) - appcaller.install_virtualenv(True) - appcaller.install_requirements() + # configuration = config.Configuration() + # proxy_info = configuration.proxy_info + # appcaller.proxy_data = system.proxy_data(configuration.proxy_info) + encoding.debugging('run_app.py: main_install()') + appcaller.install_requirements(True, requirements_checker) else: - print('unknown command') - print(parameters) - print('do nothing') + encoding.debugging('run_app.py: unknown command') + encoding.debugging(parameters) + encoding.debugging('run_app.py: do nothing') if __name__ == '__main__':