Files
pybind11_abseil/MODULE.bazel
Paul Wankadia 201a58f019 Omit bazel_skylib from MODULE.bazel.
pybind11_abseil doesn't need it; Abseil does.
(Therefore, leave it in `WORKSPACE` for now.)

PiperOrigin-RevId: 609405813
2024-02-22 09:52:22 -08:00

80 lines
1.6 KiB
Python

module(
name = "pybind11_abseil",
version = "head",
)
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"
)
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "pybind11_bazel",
strip_prefix = "pybind11_bazel-master",
urls = ["https://github.com/pybind/pybind11_bazel/archive/refs/heads/master.tar.gz"],
)
http_archive(
name = "pybind11",
build_file = "@pybind11_bazel//:pybind11-BUILD.bazel",
strip_prefix = "pybind11-master",
urls = ["https://github.com/pybind/pybind11/archive/refs/heads/master.tar.gz"],
)
#### 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")