diff --git a/MODULE.bazel b/MODULE.bazel index a829273..8996708 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -24,7 +24,11 @@ module( bazel_dep(name = "rules_proto", version = "7.0.2") bazel_dep(name = "rules_python", version = "0.37.0") bazel_dep(name = "platforms", version = "0.0.10") -bazel_dep(name = "protobuf", version = "28.3") +# TF proto version is protobuf-3.21.9, and per proto engdoc +# https://protobuf.dev/support/version-support/ +# The major version saparation happens at 21.x == 3.21 +# so we pick 21.7, which is the same generation as 3.21.9 +bazel_dep(name = "protobuf", version = "21.7") bazel_dep(name = "googletest", version = "1.15.2") bazel_dep(name = "abseil-cpp", version = "20240722.0") bazel_dep(name = "abseil-py", version = "2.1.0") @@ -32,6 +36,13 @@ bazel_dep(name = "eigen", version = "3.4.0.bcr.3") bazel_dep(name = "riegeli", version = "0.0.0-20241218-3385e3c") bazel_dep(name = "pybind11_bazel", version = "2.12.0") +single_version_override( + module_name = "riegeli", + patch_strip = 1, + patches = ["//patches:riegeli.patch"], + version = "0.0.0-20241218-3385e3c", +) + SUPPORTED_PYTHON_VERSIONS = [ "3.10", "3.11", diff --git a/oss/build_whl.sh b/oss/build_whl.sh index 6084176..0cce6e0 100755 --- a/oss/build_whl.sh +++ b/oss/build_whl.sh @@ -27,7 +27,7 @@ function main() { write_to_bazelrc "build --cxxopt=-std=c++17" write_to_bazelrc "build --host_cxxopt=-std=c++17" write_to_bazelrc "build --experimental_repo_remote_exec" - write_to_bazelrc "common --check_direct_dependencies=error" + # write_to_bazelrc "common --check_direct_dependencies=error" PLATFORM="$(uname)" if [ -n "${CROSSTOOL_TOP}" ]; then @@ -91,11 +91,12 @@ function main() { $PYTHON_BIN -c 'import array_record' $PYTHON_BIN -c 'from array_record.python import array_record_data_source' # TF is not available on Python 3.13 and above. - if [ "$(uname)" != "Darwin" ] && (( "${PYTHON_MINOR_VERSION}" < 13 )); then + # if [ "$(uname)" != "Darwin" ] && (( "${PYTHON_MINOR_VERSION}" < 13 )); then + if (( "${PYTHON_MINOR_VERSION}" < 13 )); then $PYTHON_BIN -m pip install jax tensorflow grain $PYTHON_BIN oss/test_import_grain.py $PYTHON_BIN oss/test_import_tensorflow.py fi } -main \ No newline at end of file +main diff --git a/patches/BUILD b/patches/BUILD new file mode 100644 index 0000000..34b9506 --- /dev/null +++ b/patches/BUILD @@ -0,0 +1 @@ +package(licenses = ["notice"]) diff --git a/patches/riegeli.patch b/patches/riegeli.patch new file mode 100644 index 0000000..c0b1ce2 --- /dev/null +++ b/patches/riegeli.patch @@ -0,0 +1,13 @@ +diff --git a/MODULE.bazel b/MODULE.bazel +index 2c1f801c..5d864a1c 100644 +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -44,7 +44,7 @@ bazel_dep( + ) + bazel_dep( + name = "protobuf", +- version = "28.3", ++ version = "21.7", + repo_name = "com_google_protobuf", + ) + bazel_dep(