Skip to content

Commit ffde4fc

Browse files
Internal change
PiperOrigin-RevId: 916209530
1 parent b60b825 commit ffde4fc

3 files changed

Lines changed: 59 additions & 22 deletions

File tree

MODULE.bazel

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,27 @@ module(
33
)
44

55
# https://registry.bazel.build/modules/abseil-cpp
6-
bazel_dep(name = "abseil-cpp", version = "20250814.1", repo_name = "com_google_absl")
6+
bazel_dep(name = "abseil-cpp", version = "20260107.0", repo_name = "com_google_absl")
77

88
# https://registry.bazel.build/modules/abseil-py
9-
bazel_dep(name = "abseil-py", version = "2.1.0", repo_name = "com_google_absl_py")
9+
bazel_dep(name = "abseil-py", version = "2.4.0", repo_name = "com_google_absl_py")
1010

1111
# https://github.com/bazelbuild/bazel-skylib
12-
bazel_dep(name = "bazel_skylib", version = "1.8.2")
12+
bazel_dep(name = "bazel_skylib", version = "1.9.0")
1313

1414
# https://registry.bazel.build/modules/cel-cpp
1515
bazel_dep(name = "cel-cpp", version = "0.15.0", repo_name = "com_google_cel_cpp")
16-
single_version_override(
16+
git_override(
1717
module_name = "cel-cpp",
18+
commit = "2e6e9ff4493bfbe0baf883107f3fb7ce6f675d88",
1819
patch_cmds = [
1920
# ABSL_CONST_INIT is incompatible with MSVC-CL with the /std:c++20 option
2021
"sed -i 's/ABSL_CONST_INIT //g' common/values/optional_value.cc",
2122
],
22-
version = "0.15.0",
23+
patch_cmds_win = [
24+
"python -c \"import sys; path='common/values/optional_value.cc'; content=open(path).read(); open(path,'w').write(content.replace('ABSL_CONST_INIT ',''))\"",
25+
],
26+
remote = "https://github.com/google/cel-cpp",
2327
)
2428

2529
# https://registry.bazel.build/modules/cel-spec
@@ -32,7 +36,7 @@ bazel_dep(name = "googletest", version = "1.17.0.bcr.2", repo_name = "com_google
3236
bazel_dep(name = "platforms", version = "1.0.0")
3337

3438
# https://registry.bazel.build/modules/protobuf
35-
bazel_dep(name = "protobuf", version = "33.1", repo_name = "com_google_protobuf")
39+
bazel_dep(name = "protobuf", version = "33.4", repo_name = "com_google_protobuf")
3640

3741
# https://registry.bazel.build/modules/pybind11_abseil
3842
bazel_dep(name = "pybind11_abseil", version = "202402.0")
@@ -41,25 +45,33 @@ bazel_dep(name = "pybind11_abseil", version = "202402.0")
4145
bazel_dep(name = "pybind11_bazel", version = "3.0.0")
4246

4347
# https://registry.bazel.build/modules/rules_cc
44-
bazel_dep(name = "rules_cc", version = "0.2.14")
48+
bazel_dep(name = "rules_cc", version = "0.2.16")
4549

4650
# https://registry.bazel.build/modules/rules_proto
4751
bazel_dep(name = "rules_proto", version = "7.1.0")
4852

4953
# https://registry.bazel.build/modules/rules_python
50-
bazel_dep(name = "rules_python", version = "1.7.0")
54+
bazel_dep(name = "rules_python", version = "1.9.0")
5155

5256
# On Windows the file system is case-insensitive, which creates a collision between
5357
# antlr4-cpp-runtime/VERSION and the system `#include <version>`
5458
single_version_override(
5559
module_name = "antlr4-cpp-runtime",
5660
patch_cmds = [
57-
"mv VERSION VERSION.txt",
61+
"python -c \"import os; os.rename('VERSION', 'VERSION.txt') if os.path.exists('VERSION') else None\"",
5862
],
5963
)
6064

61-
python_rules = use_extension("@rules_python//python/extensions:python.bzl", "python")
62-
python_rules.toolchain(
63-
is_default = True,
64-
python_version = "3.11",
65+
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
66+
python.defaults(python_version = "3.11")
67+
python.toolchain(python_version = "3.11")
68+
use_repo(python, "pythons_hub")
69+
70+
pybind11_internal_configure = use_extension(
71+
"@pybind11_bazel//:internal_configure.bzl",
72+
"internal_configure_extension",
6573
)
74+
use_repo(pybind11_internal_configure, "pybind11")
75+
76+
local_repo_ext = use_extension("//cel_expr_python:local_repo_extension.bzl", "local_repo_ext")
77+
use_repo(local_repo_ext, "python_headers_custom")

local_repo_extension.bzl

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
def _custom_headers_repo_impl(ctx):
2+
# Resolve label to path
3+
build_file_path = ctx.path(ctx.attr.build_file_label)
4+
repo_dir = build_file_path.dirname
5+
6+
# Symlink the include directory
7+
ctx.symlink(repo_dir.get_child("include"), "include")
8+
9+
# Create BUILD file
10+
ctx.file("BUILD.bazel", """
11+
cc_library(
12+
name = "headers",
13+
hdrs = glob(["include/python3.11/**"]),
14+
includes = ["include/python3.11"],
15+
visibility = ["//visibility:public"],
16+
)
17+
""")
18+
19+
custom_headers_repo = repository_rule(
20+
implementation = _custom_headers_repo_impl,
21+
attrs = {
22+
"build_file_label": attr.label(mandatory = True),
23+
},
24+
)
25+
26+
def _local_repo_extension_impl(ctx):
27+
custom_headers_repo(
28+
name = "python_headers_custom",
29+
build_file_label = "@@rules_python++python+python_3_11_x86_64-unknown-linux-gnu//:BUILD.bazel",
30+
)
31+
32+
local_repo_ext = module_extension(
33+
implementation = _local_repo_extension_impl,
34+
)

release/kokoro/build_windows.cfg

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)