Skip to content

Commit 4c5af14

Browse files
committed
bazel/macos: Bump version -> 7 and update rule_python
Signed-off-by: Ryan Northey <[email protected]>
1 parent 9be9637 commit 4c5af14

File tree

6 files changed

+39
-9
lines changed

6 files changed

+39
-9
lines changed

.bazelrc

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
common --noenable_bzlmod
2+
13
# Pass CC, CXX and PATH from the environment.
24
build --action_env=CC
35
build --action_env=CXX

.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.2.0
1+
7.1.0

WORKSPACE

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ load("@proxy_wasm_cpp_host//bazel:dependencies.bzl", "proxy_wasm_cpp_host_depend
88

99
proxy_wasm_cpp_host_dependencies()
1010

11+
load("@proxy_wasm_cpp_host//bazel:python.bzl", "proxy_wasm_cpp_host_python")
12+
13+
proxy_wasm_cpp_host_python()
14+
1115
load("@proxy_wasm_cpp_sdk//bazel:repositories.bzl", "proxy_wasm_cpp_sdk_repositories")
1216

1317
proxy_wasm_cpp_sdk_repositories()

bazel/dependencies.bzl

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ load("@proxy_wasm_cpp_host//bazel/cargo/wasmtime:crates.bzl", "wasmtime_fetch_re
1919
load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies")
2020
load("@rules_fuzzing//fuzzing:init.bzl", "rules_fuzzing_init")
2121
load("@rules_fuzzing//fuzzing:repositories.bzl", "rules_fuzzing_dependencies")
22-
load("@rules_python//python:pip.bzl", "pip_install")
22+
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
2323
load("@rules_rust//rust:repositories.bzl", "rust_repositories", "rust_repository_set")
2424

2525
def proxy_wasm_cpp_host_dependencies():
@@ -72,10 +72,10 @@ def proxy_wasm_cpp_host_dependencies():
7272

7373
# V8 dependencies.
7474

75-
pip_install(
76-
name = "v8_python_deps",
77-
extra_pip_args = ["--require-hashes"],
78-
requirements = "@v8//:bazel/requirements.txt",
75+
py_repositories()
76+
python_register_toolchains(
77+
name = "python3",
78+
python_version = "3.11",
7979
)
8080

8181
# Wasmtime dependencies.

bazel/python.bzl

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2020 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
load("@python_3_11//:defs.bzl", "interpreter")
16+
load("@rules_python//python:pip.bzl", "pip_parse")
17+
18+
def proxy_wasm_cpp_host_python():
19+
pip_parse(
20+
name = "v8_python_deps",
21+
python_interpreter_target = interpreter,
22+
extra_pip_args = ["--require-hashes"],
23+
requirements_lock = "@v8//:bazel/requirements.txt",
24+
)

bazel/repositories.bzl

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ def proxy_wasm_cpp_host_repositories():
6666
maybe(
6767
http_archive,
6868
name = "rules_python",
69-
sha256 = "a30abdfc7126d497a7698c29c46ea9901c6392d6ed315171a6df5ce433aa4502",
70-
strip_prefix = "rules_python-0.6.0",
71-
url = "https://github.com/bazelbuild/rules_python/archive/0.6.0.tar.gz",
69+
sha256 = "c68bdc4fbec25de5b5493b8819cfc877c4ea299c0dcb15c244c5a00208cde311",
70+
strip_prefix = "rules_python-0.31.0",
71+
url = "https://github.com/bazelbuild/rules_python/archive/0.31.0.tar.gz",
7272
)
7373

7474
maybe(

0 commit comments

Comments
 (0)