本文整理匯總了Python中projects.Projects.set_environment_variables方法的典型用法代碼示例。如果您正苦於以下問題:Python Projects.set_environment_variables方法的具體用法?Python Projects.set_environment_variables怎麽用?Python Projects.set_environment_variables使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類projects.Projects
的用法示例。
在下文中一共展示了Projects.set_environment_variables方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: main_bootstrap_build
# 需要導入模塊: from projects import Projects [as 別名]
# 或者: from projects.Projects import set_environment_variables [as 別名]
def main_bootstrap_build(args, input, state, output):
try:
print("")
output.print_main_title()
try_restore_previous_state(input, "n", state)
target = select_target(input, state, output)
Path("Build").mkdir(exist_ok=True)
dependencies = Dependencies()
dependencies.check(output)
projects = Projects(target)
projects.set_environment_variables(output)
download_source_packages(projects, args.skip_downloads, input, state,
output)
compilers = Compilers(target)
compiler = compilers.select_compiler(input, state, output)
build_configuration = BuildConfiguration()
build_configuration.select_configuration(target.architecture,
compiler, input, state)
cmake = CMake(compiler.cmake_generator)
cmake.install(target, state, output)
codesmithymake = CodeSmithyMake(target.architecture)
build_tools = BuildTools(cmake, compiler, codesmithymake)
projects.build(build_tools, build_configuration,
input, state, output)
print("")
output.print_step_title("Running tests")
if args.skip_tests:
print(" Skipping tests")
else:
projects.test(compiler, build_configuration.architecture_dir_name,
input)
output.next_step()
print("")
output.print_step_title("Setting up second-phase of bootstrap")
second_phase_path = str(Path(os.getcwd()).parent) + \
"/SecondPhaseBootstrap"
Path(second_phase_path).mkdir(exist_ok=True)
print(second_phase_path)
# TODO
shutil.copyfile("Build/CodeSmithyIDE/CodeSmithy/Bin/x64/CodeSmithy.exe", second_phase_path + "/CodeSmithy.exe")
output.next_step()
except RuntimeError as error:
print("")
print("ERROR:", error)
sys.exit(-1)