xref: /aosp_15_r20/external/tensorflow/third_party/pybind11_abseil/workspace.bzl (revision b6fb3261f9314811a0f4371741dbb8839866f948)
1"""Provides the repo macro to import pybind11_abseil.
2
3pybind11_abseil requires pybind11 (which is loaded in another rule) and pybind11_bazel.
4See https://github.com/pybind/pybind11_abseil#installation.
5"""
6
7load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls")
8
9def repo():
10    """Imports pybind11_abseil."""
11    PA_COMMIT = "d9614e4ea46b411d02674305245cba75cd91c1c6"
12    PA_SHA256 = "a2b5509dc1c344954fc2f1ba1d277afae84167691c0daad59b6da71886d1f276"
13    tf_http_archive(
14        name = "pybind11_abseil",
15        sha256 = PA_SHA256,
16        strip_prefix = "pybind11_abseil-{commit}".format(commit = PA_COMMIT),
17        urls = tf_mirror_urls("https://github.com/pybind/pybind11_abseil/archive/{commit}.tar.gz".format(commit = PA_COMMIT)),
18        build_file = "//third_party/pybind11_abseil:BUILD",
19    )
20
21    # pybind11_bazel is a dependency of pybind11_abseil.
22    PB_COMMIT = "72cbbf1fbc830e487e3012862b7b720001b70672"
23    PB_SHA256 = "516c1b3a10d87740d2b7de6f121f8e19dde2c372ecbfe59aef44cd1872c10395"
24    tf_http_archive(
25        name = "pybind11_bazel",
26        strip_prefix = "pybind11_bazel-{commit}".format(commit = PB_COMMIT),
27        sha256 = PB_SHA256,
28        urls = tf_mirror_urls("https://github.com/pybind/pybind11_bazel/archive/72cbbf1fbc830e487e3012862b7b720001b70672.tar.gz"),
29    )
30