예제 #1
0
파일: gui.py 프로젝트: swz-gh/RLBotGUI
def install_requirements(config_path):
    try:
        bundle = get_bot_config_bundle(config_path)
    except Exception:
        bundle = get_script_config_bundle(config_path)

    if bundle.requirements_file:
        exit_code = install_requirements_file(bundle.requirements_file)
        return {'exitCode': exit_code, 'package': bundle.requirements_file}
    else:
        return {'exitCode': 1, 'package': None}
예제 #2
0
def install_requirements(config_path):
    try:
        bundle = get_bot_config_bundle(config_path)
    except Exception:
        bundle = get_script_config_bundle(config_path)

    if bundle.requirements_file:
        exit_code = install_requirements_file(bundle.requirements_file)
        installed_packages = [
            r.line for r in bundle.get_missing_python_packages() +
            bundle.get_python_packages_needing_upgrade()
        ]
        return {'exitCode': exit_code, 'packages': installed_packages}
    else:
        return {'exitCode': 1, 'packages': None}