(build_python, build_java, build_cpp, build_redis)
| 540 | |
| 541 | |
| 542 | def build(build_python, build_java, build_cpp, build_redis): |
| 543 | if tuple(sys.version_info[:2]) not in SUPPORTED_PYTHONS: |
| 544 | msg = ( |
| 545 | "Detected Python version {}, which is not supported. " |
| 546 | "Only Python {} are supported." |
| 547 | ).format( |
| 548 | ".".join(map(str, sys.version_info[:2])), |
| 549 | ", ".join(".".join(map(str, v)) for v in SUPPORTED_PYTHONS), |
| 550 | ) |
| 551 | raise RuntimeError(msg) |
| 552 | |
| 553 | if is_invalid_windows_platform(): |
| 554 | msg = ( |
| 555 | "Please use official native CPython on Windows," |
| 556 | " not Cygwin/MSYS/MSYS2/MinGW/etc.\n" |
| 557 | + "Detected: {}\n at: {!r}".format(sys.version, sys.executable) |
| 558 | ) |
| 559 | raise OSError(msg) |
| 560 | |
| 561 | # Vendor thirdparty packages. |
| 562 | # |
| 563 | # TODO(ray-core, ray-ci): the version of these vendored packages should be |
| 564 | # pinned, so that the build is reproducible. |
| 565 | if not os.getenv("SKIP_THIRDPARTY_INSTALL_CONDA_FORGE"): |
| 566 | pip_packages = ["psutil", "colorama"] |
| 567 | subprocess.check_call( |
| 568 | [ |
| 569 | sys.executable, |
| 570 | "-m", |
| 571 | "pip", |
| 572 | "install", |
| 573 | "-q", |
| 574 | "--target=" + os.path.join(ROOT_DIR, THIRDPARTY_SUBDIR), |
| 575 | ] |
| 576 | + pip_packages, |
| 577 | env=dict(os.environ, CC="gcc"), |
| 578 | ) |
| 579 | |
| 580 | # runtime env agent dependenceis |
| 581 | runtime_env_agent_pip_packages = ["aiohttp"] |
| 582 | subprocess.check_call( |
| 583 | [ |
| 584 | sys.executable, |
| 585 | "-m", |
| 586 | "pip", |
| 587 | "install", |
| 588 | "-q", |
| 589 | "--target=" |
| 590 | + os.path.join(ROOT_DIR, RUNTIME_ENV_AGENT_THIRDPARTY_SUBDIR), |
| 591 | ] |
| 592 | + runtime_env_agent_pip_packages |
| 593 | ) |
| 594 | |
| 595 | bazel_targets = [] |
| 596 | if build_python: |
| 597 | bazel_targets.append("//:gen_ray_pkg") |
| 598 | if build_cpp: |
| 599 | bazel_targets.append("//cpp:gen_ray_cpp_pkg") |
no test coverage detected
searching dependent graphs…