Skip to content

Commit

Permalink
Don't hardcode assumed python3 path in .bazelrc
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hzeller authored and copybara-github committed Feb 21, 2023
1 parent c579e14 commit 392477f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 392477f

Please sign in to comment.