From 392477f7f598f29ca3d4c4a521dc276c87d001ae Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Tue, 21 Feb 2023 08:53:08 -0800 Subject: [PATCH] Don't hardcode assumed python3 path in .bazelrc Instead, tell pybind11 which python version to look out for. Internally it assembles "python" + $python_version. The environment has python3 in the path. If the python3 binary is at a different place than expected, the README has a description how to override: https://github.com/google/xls#building-from-source PiperOrigin-RevId: 511213683 --- .bazelrc | 1 - WORKSPACE | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.bazelrc b/.bazelrc index 2d43fa52a0..077f5fa4ec 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,4 +1,3 @@ -build --action_env=PYTHON_BIN_PATH=/usr/bin/python3 build --action_env=BAZEL_CXXOPTS=-std=c++17 build --cxxopt "-std=c++17" build --copt "-Wno-sign-compare" diff --git a/WORKSPACE b/WORKSPACE index 7986d000b7..ced88de428 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -51,7 +51,7 @@ load_external_repositories() # We have to configure Python before gRPC tries to configure it a different # way. load("@pybind11_bazel//:python_configure.bzl", "python_configure") -python_configure(name = "local_config_python") +python_configure(name = "local_config_python", python_version="3") # gRPC deps should be loaded before initializing other repos. Otherwise, various # errors occur during repo loading and initialization.