Files
pybind11_abseil/MODULE.bazel
Ralf W. Grosse-Kunstleve d25d7b3f3a Pin pybind11_bazel to the same version currently used for pybind11_protobuf.
Leave it for later to resolve the `ubuntu-latest bazel` failure:

* https://github.com/pybind/pybind11_bazel/issues/94

```
ERROR: /home/runner/work/pybind11_abseil/pybind11_abseil/pybind11_abseil/tests/BUILD:92:17: Linking pybind11_abseil/tests/missing_import.so failed: (Exit 1): gcc failed: error executing CppLink command (from target //pybind11_abseil/tests:missing_import.so) /usr/bin/gcc @bazel-out/k8-fastbuild/bin/pybind11_abseil/tests/missing_import.so-2.params

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
/usr/bin/ld.gold: undefs: unknown -z option
```

PiperOrigin-RevId: 659560021
2024-08-05 08:16:53 -07:00

75 lines
1.3 KiB
Python

module(
name = "pybind11_abseil",
version = "head",
)
bazel_dep(
name = "bazel_skylib",
version = "1.5.0",
)
bazel_dep(
name = "abseil-cpp",
version = "20240116.0",
repo_name = "com_google_absl",
)
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
bazel_dep(
name = "rules_python",
version = "0.31.0",
)
bazel_dep(
name = "platforms",
version = "0.0.8"
)
bazel_dep(
name = "pybind11_bazel",
version = "2.11.1.bzl.2",
)
#### DEV ONLY DEPENDENCIES BELOW HERE ####
SUPPORTED_PYTHON_VERSIONS = [
"3.12",
"3.11",
"3.10",
"3.9",
"3.8"
]
DEFAULT_PYTHON = "3.11"
python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency=True)
[
python.toolchain(
python_version = version,
is_default = version == DEFAULT_PYTHON,
)
for version in SUPPORTED_PYTHON_VERSIONS
]
use_repo(
python,
python = "python_versions",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip", dev_dependency=True)
[
pip.parse(
hub_name = "pypi",
python_version = version,
requirements_lock = "//pybind11_abseil/requirements:requirements_lock_" + version.replace('.','_') + ".txt",
)
for version in SUPPORTED_PYTHON_VERSIONS
]
use_repo(pip, "pypi")