-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix OSS builds with the following changes:
1. Use CTAD to allow TriStatePtr to be used with non-unique_ptr data. 2. Migrate from old WORKSPACE to MODULE.bazel 3. Use pip python rule to manage pip dependencies required by array_record_datasource. PiperOrigin-RevId: 709169059
- Loading branch information
1 parent
82e3d0f
commit 50377fc
Showing
17 changed files
with
269 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
load("@rules_python//python:pip.bzl", "compile_pip_requirements") | ||
|
||
|
||
py_library( | ||
name = "setup", | ||
srcs = ["setup.py"], | ||
) | ||
|
||
compile_pip_requirements( | ||
name = "requirements", | ||
src = "requirements.in", | ||
requirements_txt = "requirements_lock.txt", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
############################################################################### | ||
# Bazel now uses Bzlmod by default to manage external dependencies. | ||
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. | ||
# | ||
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958 | ||
############################################################################### | ||
|
||
# TODO(fchern): automate version string alignment with setup.py | ||
VERSION = "0.6.0" | ||
|
||
module( | ||
name = "array_record", | ||
version = VERSION, | ||
repo_name = "com_google_array_record", | ||
) | ||
|
||
bazel_dep(name = "abseil-cpp", version = "20240722.0", repo_name = "com_google_absl") | ||
bazel_dep(name = "abseil-py", version = "2.1.0", repo_name = "com_google_absl_py") | ||
bazel_dep(name = "pybind11_bazel", version = "2.12.0") | ||
bazel_dep(name = "rules_proto", version = "7.0.2") | ||
bazel_dep(name = "googletest", version = "1.15.2", repo_name = "com_google_googletest") | ||
bazel_dep(name = "riegeli", version = "0.0.0-20240927-cdfb25a", repo_name = "com_google_riegeli") | ||
bazel_dep(name = "platforms", version = "0.0.10") | ||
bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf") | ||
bazel_dep(name = "rules_python", version = "0.40.0") | ||
|
||
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
# V3.4.0, 20210818 | ||
http_archive( | ||
name = "eigen3", | ||
build_file_content = | ||
""" | ||
cc_library( | ||
name = 'eigen3', | ||
srcs = [], | ||
includes = ['.'], | ||
hdrs = glob(['Eigen/**', 'unsupported/Eigen/**']), | ||
visibility = ['//visibility:public'], | ||
) | ||
""", | ||
sha256 = "b4c198460eba6f28d34894e3a5710998818515104d6e74e5cc331ce31e46e626", | ||
strip_prefix = "eigen-3.4.0", | ||
urls = [ | ||
"https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2", | ||
], | ||
) | ||
|
||
PYTHON_VERSION = "3.10" | ||
|
||
python = use_extension("@rules_python//python/extensions:python.bzl", "python") | ||
python.toolchain( | ||
python_version = PYTHON_VERSION, | ||
) | ||
|
||
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") | ||
|
||
# requirements_lock.txt is generated by | ||
# bazel run //:requirements.update | ||
pip.parse( | ||
hub_name = "pypi", | ||
python_version = PYTHON_VERSION, | ||
requirements_lock = "//:requirements_lock.txt", | ||
) | ||
use_repo(pip, "pypi") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.