Mark module extension as reproducible (#114)
* Mark module extension as reproducible
This avoids an unnecessary lockfile entry.
* Update MODULE.bazel
diff --git a/MODULE.bazel b/MODULE.bazel
index 18a821c..a50718a 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -4,6 +4,7 @@
version = "3.0.0",
)
+bazel_dep(name = "bazel_features", version = "1.36.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_cc", version = "0.0.9")
diff --git a/internal_configure.bzl b/internal_configure.bzl
index 40fef51..afaf9d5 100644
--- a/internal_configure.bzl
+++ b/internal_configure.bzl
@@ -1,5 +1,6 @@
"""Module extension for "configuring" pybind11_bazel."""
+load("@bazel_features//:features.bzl", "bazel_features")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
_INTEGRITIES = {
@@ -27,4 +28,9 @@
integrity = _INTEGRITIES.get(version),
)
+ if bazel_features.external_deps.extension_metadata_has_reproducible:
+ return module_ctx.extension_metadata(reproducible = True)
+ else:
+ return None
+
internal_configure_extension = module_extension(implementation = _internal_configure_extension_impl)