Skip to content

Commit

Permalink
build: standardize on PY3 (envoyproxy#10586)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Klein <mklein@lyft.com>
  • Loading branch information
mattklein123 committed Mar 31, 2020
1 parent 4e1f9f9 commit 229faeb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ startup --host_jvm_args=-Xmx2g
build --workspace_status_command=bazel/get_workspace_status
build --experimental_local_memory_estimate
build --experimental_strict_action_env=true
build --host_force_python=PY2
build --host_force_python=PY3
build --action_env=BAZEL_LINKLIBS=-l%:libstdc++.a
build --action_env=BAZEL_LINKOPTS=-lm
build --host_javabase=@bazel_tools//tools/jdk:remote_jdk11
Expand Down
12 changes: 6 additions & 6 deletions docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ pip3 install -r "${SCRIPT_DIR}"/requirements.txt
# files still.
rm -rf bazel-bin/external/envoy_api_canonical

# This is for local RBE setup, should be no-op for builds without RBE setting in bazelrc files.
BAZEL_BUILD_OPTIONS+=" --remote_download_outputs=all --strategy=protodoc=sandboxed,local"

export EXTENSION_DB_PATH="$(realpath "${BUILD_DIR}/extension_db.json")"

# This is for local RBE setup, should be no-op for builds without RBE setting in bazelrc files.
BAZEL_BUILD_OPTIONS+=" --remote_download_outputs=all --strategy=protodoc=sandboxed,local
--action_env=ENVOY_BLOB_SHA --action_env=EXTENSION_DB_PATH"

# Generate extension database. This maps from extension name to extension
# metadata, based on the envoy_cc_extension() Bazel target attributes.
./docs/generate_extension_db.py "${EXTENSION_DB_PATH}"
Expand All @@ -70,12 +71,11 @@ function generate_api_rst() {

# Generate the extensions docs
bazel build ${BAZEL_BUILD_OPTIONS} @envoy_api_canonical//:"${API_VERSION}"_protos --aspects \
tools/protodoc/protodoc.bzl%protodoc_aspect --output_groups=rst --action_env=CPROFILE_ENABLED=1 \
--action_env=ENVOY_BLOB_SHA --action_env=EXTENSION_DB_PATH="${EXTENSION_DB_PATH}" --host_force_python=PY3
tools/protodoc/protodoc.bzl%protodoc_aspect --output_groups=rst

# Fill in boiler plate for extensions that have google.protobuf.Empty as their
# config.
bazel run ${BAZEL_BUILD_OPTIONS} //tools/protodoc:generate_empty -- \
bazel run ${BAZEL_BUILD_OPTIONS} //tools/protodoc:generate_empty \
"${PWD}"/docs/empty_extensions.json "${PWD}/${GENERATED_RST_DIR}"/api-"${API_VERSION}"/config

# We do ** matching below to deal with Bazel cache blah (source proto artifacts
Expand Down
3 changes: 1 addition & 2 deletions tools/proto_format/proto_format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ declare -r PROTO_TARGETS=$(bazel query "labels(srcs, labels(deps, @envoy_api_can
BAZEL_BUILD_OPTIONS+=" --remote_download_outputs=all"

bazel build ${BAZEL_BUILD_OPTIONS} --//tools/api_proto_plugin:default_type_db_target=@envoy_api_canonical//versioning:active_protos \
@envoy_api_canonical//versioning:active_protos --aspects //tools/protoxform:protoxform.bzl%protoxform_aspect --output_groups=proto \
--action_env=CPROFILE_ENABLED=1 --host_force_python=PY3
@envoy_api_canonical//versioning:active_protos --aspects //tools/protoxform:protoxform.bzl%protoxform_aspect --output_groups=proto

TOOLS=$(dirname $(dirname $(realpath $0)))
# to satisfy dependency on api_proto_plugin
Expand Down
3 changes: 1 addition & 2 deletions tools/protoxform/protoxform_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ declare -r PROTO_TARGETS=$(bazel query "labels(srcs, labels(deps, //tools/testda
BAZEL_BUILD_OPTIONS+=" --remote_download_outputs=all"

bazel build ${BAZEL_BUILD_OPTIONS} --//tools/api_proto_plugin:default_type_db_target=//tools/testdata/protoxform:protos \
//tools/testdata/protoxform:protos --aspects //tools/protoxform:protoxform.bzl%protoxform_aspect --output_groups=proto \
--action_env=CPROFILE_ENABLED=1 --host_force_python=PY3
//tools/testdata/protoxform:protos --aspects //tools/protoxform:protoxform.bzl%protoxform_aspect --output_groups=proto

TOOLS=$(dirname $(dirname $(realpath $0)))
# to satisfy dependency on run_command
Expand Down

0 comments on commit 229faeb

Please sign in to comment.