SERVER-120217 Update to using rules python (#48943)

GitOrigin-RevId: 4684e8f134d1fff534747129566fed89a4f96528
This commit is contained in:
Andrew Bradshaw 2026-03-05 17:16:22 -08:00 committed by MongoDB Bot
parent 40bd5f34d8
commit f4644578e0
129 changed files with 618 additions and 184 deletions

View File

@ -590,6 +590,11 @@ common:public-release --stamp
common --@rules_rust//rust/toolchain/channel=nightly
common --@rules_rust//rust/settings:experimental_use_allocator_libraries_with_mangled_symbols=true
common --@rules_python//python/config_settings:bootstrap_impl=script
# https://github.com/bazel-contrib/rules_python/issues/2864
common --@rules_python//python/config_settings:venvs_site_packages=no
common --@rules_python//python/config_settings:venvs_use_declare_symlink=no
# Experimental flag to collect system network usage metrics during build
common --experimental_collect_system_network_usage

View File

@ -5,6 +5,7 @@ load("@npm//:eslint/package_json.bzl", eslint_bin = "bin")
load("@npm//:prettier/package_json.bzl", prettier = "bin")
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("@rules_python//python:defs.bzl", "py_binary")
load("//bazel:mongo_js_rules.bzl", "mongo_js_library")
load("//bazel/config:render_template.bzl", "render_template")
load("//bazel/install_rules:bolt.bzl", "bolt_instrument", "bolt_optimize")
@ -100,29 +101,27 @@ render_template(
name = "clang_tidy_config",
srcs = [
".clang-tidy.in",
"//buildscripts:clang_tidy_config_gen.py",
],
cmd = [
"$(location //buildscripts:clang_tidy_config_gen.py)",
"--input=$(location .clang-tidy.in)",
"--output=$(location .clang-tidy)",
],
output = ".clang-tidy",
python_file = "//buildscripts:clang_tidy_config_gen.py",
)
render_template(
name = "clang_tidy_config_strict",
srcs = [
".clang-tidy.in",
"//buildscripts:clang_tidy_config_gen.py",
],
cmd = [
"$(location //buildscripts:clang_tidy_config_gen.py)",
"--input=$(location .clang-tidy.in)",
"--output=$(location .clang-tidy.strict)",
"--warnings-as-errors",
],
output = ".clang-tidy.strict",
python_file = "//buildscripts:clang_tidy_config_gen.py",
)
genrule(

View File

@ -126,12 +126,7 @@ git_override(
#
## We need skylib to be able to use config_setting_group in rule_poetry below
## https://github.com/bazelbuild/bazel-skylib/blob/main/docs/selects_doc.md#selectsconfig_setting_group
bazel_dep(name = "bazel_skylib", version = "1.7.1")
single_version_override(
module_name = "bazel_skylib",
version = "1.7.1",
)
bazel_dep(name = "bazel_skylib", version = "1.9.0")
bazel_dep(name = "rules_pkg", version = "1.2.0")
bazel_dep(name = "abseil-cpp", version = "20250512.1", repo_name = "com_google_absl")
local_path_override(
@ -189,9 +184,7 @@ local_path_override(
path = "src/third_party/fuzztest/dist",
)
# This is just here because 1.5.1 has a bug in it and our current version of re2 will pull in 1.5.1
# If re2 is ever upgraded past 2025-08-12 this can be unpinned
bazel_dep(name = "rules_python", version = "1.5.2")
bazel_dep(name = "rules_python", version = "1.8.5")
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
single_version_override(

276
MODULE.bazel.lock generated
View File

@ -34,8 +34,20 @@
"https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7",
"https://bcr.bazel.build/modules/bazel_features/1.9.0/MODULE.bazel": "885151d58d90d8d9c811eb75e3288c11f850e1d6b481a8c9f766adee4712358b",
"https://bcr.bazel.build/modules/bazel_features/1.9.1/MODULE.bazel": "8f679097876a9b609ad1f60249c49d68bfab783dd9be012faf9d82547b14815a",
"https://bcr.bazel.build/modules/bazel_skylib/1.0.3/MODULE.bazel": "bcb0fd896384802d1ad283b4e4eb4d718eebd8cb820b0a2c3a347fb971afd9d8",
"https://bcr.bazel.build/modules/bazel_skylib/1.1.1/MODULE.bazel": "1add3e7d93ff2e6998f9e118022c84d163917d912f5afafb3058e3d2f1545b5e",
"https://bcr.bazel.build/modules/bazel_skylib/1.2.0/MODULE.bazel": "44fe84260e454ed94ad326352a698422dbe372b21a1ac9f3eab76eb531223686",
"https://bcr.bazel.build/modules/bazel_skylib/1.2.1/MODULE.bazel": "f35baf9da0efe45fa3da1696ae906eea3d615ad41e2e3def4aeb4e8bc0ef9a7a",
"https://bcr.bazel.build/modules/bazel_skylib/1.3.0/MODULE.bazel": "20228b92868bf5cfc41bda7afc8a8ba2a543201851de39d990ec957b513579c5",
"https://bcr.bazel.build/modules/bazel_skylib/1.4.1/MODULE.bazel": "a0dcb779424be33100dcae821e9e27e4f2901d9dfd5333efe5ac6a8d7ab75e1d",
"https://bcr.bazel.build/modules/bazel_skylib/1.4.2/MODULE.bazel": "3bd40978e7a1fac911d5989e6b09d8f64921865a45822d8b09e815eaa726a651",
"https://bcr.bazel.build/modules/bazel_skylib/1.5.0/MODULE.bazel": "32880f5e2945ce6a03d1fbd588e9198c0a959bb42297b2cfaf1685b7bc32e138",
"https://bcr.bazel.build/modules/bazel_skylib/1.6.1/MODULE.bazel": "8fdee2dbaace6c252131c00e1de4b165dc65af02ea278476187765e1a617b917",
"https://bcr.bazel.build/modules/bazel_skylib/1.7.1/MODULE.bazel": "3120d80c5861aa616222ec015332e5f8d3171e062e3e804a2a0253e1be26e59b",
"https://bcr.bazel.build/modules/bazel_skylib/1.7.1/source.json": "f121b43eeefc7c29efbd51b83d08631e2347297c95aac9764a701f2a6a2bb953",
"https://bcr.bazel.build/modules/bazel_skylib/1.8.1/MODULE.bazel": "88ade7293becda963e0e3ea33e7d54d3425127e0a326e0d17da085a5f1f03ff6",
"https://bcr.bazel.build/modules/bazel_skylib/1.8.2/MODULE.bazel": "69ad6927098316848b34a9142bcc975e018ba27f08c4ff403f50c1b6e646ca67",
"https://bcr.bazel.build/modules/bazel_skylib/1.9.0/MODULE.bazel": "72997b29dfd95c3fa0d0c48322d05590418edef451f8db8db5509c57875fb4b7",
"https://bcr.bazel.build/modules/bazel_skylib/1.9.0/source.json": "7ad77c1e8c1b84222d9b3f3cae016a76639435744c19330b0b37c0a3c9da7dc0",
"https://bcr.bazel.build/modules/brotli/1.1.0/MODULE.bazel": "3b5b90488995183419c4b5c9b063a164f6c0bc4d0d6b40550a612a5e860cc0fe",
"https://bcr.bazel.build/modules/brotli/1.1.0/source.json": "098a4fd315527166e8dfe1fd1537c96a737a83764be38fc43f4da231d600f3d0",
"https://bcr.bazel.build/modules/buildifier_prebuilt/6.4.0/MODULE.bazel": "37389c6b5a40c59410b4226d3bb54b08637f393d66e2fa57925c6fcf68e64bf4",
@ -125,6 +137,7 @@
"https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5",
"https://bcr.bazel.build/modules/rules_cc/0.1.1/MODULE.bazel": "2f0222a6f229f0bf44cd711dc13c858dad98c62d52bd51d8fc3a764a83125513",
"https://bcr.bazel.build/modules/rules_cc/0.1.4/MODULE.bazel": "bb03a452a7527ac25a7518fb86a946ef63df860b9657d8323a0c50f8504fb0b9",
"https://bcr.bazel.build/modules/rules_cc/0.1.5/MODULE.bazel": "88dfc9361e8b5ae1008ac38f7cdfd45ad738e4fa676a3ad67d19204f045a1fd8",
"https://bcr.bazel.build/modules/rules_cc/0.2.10/MODULE.bazel": "76e71013ff06010b5a6682751f85b60ee7b9fd89eec0dca97583919dd8c6f44e",
"https://bcr.bazel.build/modules/rules_cc/0.2.10/source.json": "e517ec6451617032750803d6f9028e849eaf0d08878d23f9e66e8415d241b4f8",
"https://bcr.bazel.build/modules/rules_cc/0.2.4/MODULE.bazel": "1ff1223dfd24f3ecf8f028446d4a27608aa43c3f41e346d22838a4223980b8cc",
@ -204,8 +217,8 @@
"https://bcr.bazel.build/modules/rules_python/1.0.0/MODULE.bazel": "898a3d999c22caa585eb062b600f88654bf92efb204fa346fb55f6f8edffca43",
"https://bcr.bazel.build/modules/rules_python/1.2.0/MODULE.bazel": "5aeeb48b2a6c19d668b48adf2b8a2b209a6310c230db0ce77450f148a89846e4",
"https://bcr.bazel.build/modules/rules_python/1.5.1/MODULE.bazel": "acfe65880942d44a69129d4c5c3122d57baaf3edf58ae5a6bd4edea114906bf5",
"https://bcr.bazel.build/modules/rules_python/1.5.2/MODULE.bazel": "5e4bbe842ffdb54dfb6ddd78de3d28151a4cc3417a685cee30c8fe4d1dc655a2",
"https://bcr.bazel.build/modules/rules_python/1.5.2/source.json": "687aa52b6da283ee45cb702bc292386fd9c717264c38c0277b4957eeafbe1904",
"https://bcr.bazel.build/modules/rules_python/1.8.5/MODULE.bazel": "28b2d79ed8368d7d45b34bacc220e3c0b99cbcd9392641961b849e4c3f55dd30",
"https://bcr.bazel.build/modules/rules_python/1.8.5/source.json": "e261b03c8804f2582c9536013f987e1ea105a2b38c238aa2ac8f98fc34c8b18a",
"https://bcr.bazel.build/modules/rules_rust/0.68.1/MODULE.bazel": "8d3332ef4079673385eb81f8bd68b012decc04ac00c9d5a01a40eff90301732c",
"https://bcr.bazel.build/modules/rules_rust/0.68.1/source.json": "3378e746f81b62457fdfd37391244fa8ff075ba85c05931ee4f3a20ac1efe963",
"https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c",
@ -237,7 +250,7 @@
"moduleExtensions": {
"//bazel:bzlmod.bzl%setup_mongo_python_toolchains": {
"general": {
"bzlTransitiveDigest": "idv0XYvsT1OQdB9a7uhWyDT9+BJ+bHIqCuxGgcyyLUg=",
"bzlTransitiveDigest": "haX1p8/zzNyOuJ0HhUV2PcV9W2RcHiQiqq8XfYZU1vY=",
"usagesDigest": "bUxjq9n+hj2YwYT/lcSP4lHyQ2GVy5JpFgSmddUqUZg=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
@ -994,10 +1007,261 @@
"recordedRepoMappingEntries": []
}
},
"@@rules_python~//python/extensions:config.bzl%config": {
"general": {
"bzlTransitiveDigest": "9SmjaE1bQpi4boSnT3zl6a9czyENO/gaJA8KoOYGT3A=",
"usagesDigest": "lUc0b3wUkbI1EVyzvJLtzddJg6yHYGzR3FWAr0x31KM=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
"envVariables": {},
"generatedRepoSpecs": {
"rules_python_internal": {
"bzlFile": "@@rules_python~//python/private:internal_config_repo.bzl",
"ruleClassName": "internal_config_repo",
"attributes": {
"transition_setting_generators": {},
"transition_settings": []
}
},
"pypi__build": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/e2/03/f3c8ba0a6b6e30d7d18c40faab90807c9bb5e9a1e3b2fe2008af624a9c97/build-1.2.1-py3-none-any.whl",
"sha256": "75e10f767a433d9a86e50d83f418e83efc18ede923ee5ff7df93b6cb0306c5d4",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__click": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl",
"sha256": "ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__colorama": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl",
"sha256": "4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__importlib_metadata": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/2d/0a/679461c511447ffaf176567d5c496d1de27cbe34a87df6677d7171b2fbd4/importlib_metadata-7.1.0-py3-none-any.whl",
"sha256": "30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__installer": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/e5/ca/1172b6638d52f2d6caa2dd262ec4c811ba59eee96d54a7701930726bce18/installer-0.7.0-py3-none-any.whl",
"sha256": "05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__more_itertools": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/50/e2/8e10e465ee3987bb7c9ab69efb91d867d93959095f4807db102d07995d94/more_itertools-10.2.0-py3-none-any.whl",
"sha256": "686b06abe565edfab151cb8fd385a05651e1fdf8f0a14191e4439283421f8684",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__packaging": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/49/df/1fceb2f8900f8639e278b056416d49134fb8d84c5942ffaa01ad34782422/packaging-24.0-py3-none-any.whl",
"sha256": "2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__pep517": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/25/6e/ca4a5434eb0e502210f591b97537d322546e4833dcb4d470a48c375c5540/pep517-0.13.1-py3-none-any.whl",
"sha256": "31b206f67165b3536dd577c5c3f1518e8fbaf38cbc57efff8369a392feff1721",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__pip": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl",
"sha256": "ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__pip_tools": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/0d/dc/38f4ce065e92c66f058ea7a368a9c5de4e702272b479c0992059f7693941/pip_tools-7.4.1-py3-none-any.whl",
"sha256": "4c690e5fbae2f21e87843e89c26191f0d9454f362d8acdbd695716493ec8b3a9",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__pyproject_hooks": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/ae/f3/431b9d5fe7d14af7a32340792ef43b8a714e7726f1d7b69cc4e8e7a3f1d7/pyproject_hooks-1.1.0-py3-none-any.whl",
"sha256": "7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__setuptools": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/90/99/158ad0609729111163fc1f674a5a42f2605371a4cf036d0441070e2f7455/setuptools-78.1.1-py3-none-any.whl",
"sha256": "c3a9c4211ff4c309edb8b8c4f1cbfa7ae324c4ba9f91ff254e3d305b9fd54561",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__tomli": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl",
"sha256": "939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__wheel": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/7d/cd/d7460c9a869b16c3dd4e1e403cce337df165368c71d6af229a74699622ce/wheel-0.43.0-py3-none-any.whl",
"sha256": "55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
},
"pypi__zipp": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_archive",
"attributes": {
"url": "https://files.pythonhosted.org/packages/da/55/a03fd7240714916507e1fcf7ae355bd9d9ed2e6db492595f1a67f61681be/zipp-3.18.2-py3-none-any.whl",
"sha256": "dce197b859eb796242b0622af1b8beb0a722d52aa2f57133ead08edd5bf5374e",
"type": "zip",
"build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n"
}
}
},
"recordedRepoMappingEntries": [
[
"rules_python~",
"bazel_tools",
"bazel_tools"
],
[
"rules_python~",
"pypi__build",
"rules_python~~config~pypi__build"
],
[
"rules_python~",
"pypi__click",
"rules_python~~config~pypi__click"
],
[
"rules_python~",
"pypi__colorama",
"rules_python~~config~pypi__colorama"
],
[
"rules_python~",
"pypi__importlib_metadata",
"rules_python~~config~pypi__importlib_metadata"
],
[
"rules_python~",
"pypi__installer",
"rules_python~~config~pypi__installer"
],
[
"rules_python~",
"pypi__more_itertools",
"rules_python~~config~pypi__more_itertools"
],
[
"rules_python~",
"pypi__packaging",
"rules_python~~config~pypi__packaging"
],
[
"rules_python~",
"pypi__pep517",
"rules_python~~config~pypi__pep517"
],
[
"rules_python~",
"pypi__pip",
"rules_python~~config~pypi__pip"
],
[
"rules_python~",
"pypi__pip_tools",
"rules_python~~config~pypi__pip_tools"
],
[
"rules_python~",
"pypi__pyproject_hooks",
"rules_python~~config~pypi__pyproject_hooks"
],
[
"rules_python~",
"pypi__setuptools",
"rules_python~~config~pypi__setuptools"
],
[
"rules_python~",
"pypi__tomli",
"rules_python~~config~pypi__tomli"
],
[
"rules_python~",
"pypi__wheel",
"rules_python~~config~pypi__wheel"
],
[
"rules_python~",
"pypi__zipp",
"rules_python~~config~pypi__zipp"
]
]
}
},
"@@rules_python~//python/uv:uv.bzl%uv": {
"general": {
"bzlTransitiveDigest": "mxPY/VBQrSC9LvYeRrlxD+0IkDTQ4+36NGMnGWlN/Vw=",
"usagesDigest": "+IhE0HT6ocmsX1GBdBt9hMRX4CPhV1tICoPAw2jfuJE=",
"bzlTransitiveDigest": "K6zoA/u57+d21o50BApale3BrKDIB1vWM6q455k772s=",
"usagesDigest": "WBglFllfLEiRiR3B9XpMdsZ6iL3talW/IXK9+mt2r7E=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
"envVariables": {},

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary")
package(default_visibility = ["//visibility:public"])

View File

@ -1,4 +1,5 @@
load("@bazel_skylib//lib:selects.bzl", "selects")
load("@rules_python//python:defs.bzl", "py_binary")
load(
"@bazel_skylib//rules:common_settings.bzl",
"bool_flag",
@ -82,10 +83,11 @@ config_setting(
],
)
# Expose script for external usage through bazel.
exports_files([
"generate_config_header.py",
])
py_binary(
name = "generate_config_header",
srcs = ["generate_config_header.py"],
main = "generate_config_header.py",
)
# --------------------------------------
# Compiler types

View File

@ -61,9 +61,6 @@ def generate_config_header_impl(ctx):
"cpp_defines": " ".join(ctx.attr.cpp_defines),
}
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
generator_script = ctx.attr.generator_script.files.to_list()[0].path
additional_inputs = []
additional_inputs_depsets = []
for additional_input in ctx.attr.additional_inputs:
@ -74,18 +71,15 @@ def generate_config_header_impl(ctx):
additional_inputs.append(file.path)
ctx.actions.run(
executable = python.interpreter.path,
executable = ctx.executable.generator_script,
outputs = [ctx.outputs.output, ctx.outputs.logfile],
mnemonic = "ConfigHeaderGen",
inputs = depset(transitive = [
cc_toolchain.all_files,
python.files,
ctx.attr.generator_script.files,
ctx.attr.template.files,
ctx.attr.checks.files,
] + additional_inputs_depsets),
arguments = [
generator_script, # bazel/config/mongo_config_header.py
"--output-path",
ctx.outputs.output.path,
"--template-path",
@ -148,14 +142,15 @@ generate_config_header_rule = rule(
),
"generator_script": attr.label(
doc = "The python generator script to use.",
default = "//bazel/config:generate_config_header.py",
allow_single_file = True,
default = "//bazel/config:generate_config_header",
executable = True,
cfg = "exec",
),
"_cc_toolchain": attr.label(default = "@bazel_tools//tools/cpp:current_cc_toolchain"),
"_sdkroot": attr.label(default = "//bazel/config:sdkroot"),
},
fragments = ["cpp"],
toolchains = ["@bazel_tools//tools/cpp:toolchain_type", "@bazel_tools//tools/python:toolchain_type"],
toolchains = ["@bazel_tools//tools/cpp:toolchain_type", "@rules_python//python:toolchain_type"],
output_to_genfiles = True,
)

View File

@ -1,26 +1,22 @@
load("//bazel:utils.bzl", "write_target")
load("@rules_python//python:defs.bzl", "py_binary")
def python_genrule_impl(ctx):
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python_libs = [py_dep[PyInfo].transitive_sources for py_dep in ctx.attr.python_libs]
python_path = []
for py_dep in ctx.attr.python_libs:
for path in py_dep[PyInfo].imports.to_list():
if path not in python_path:
python_path.append(ctx.expand_make_variables("python_library_imports", "$(BINDIR)/external/" + path, ctx.var))
expanded_args = [
ctx.expand_make_variables("render_template_expand", ctx.expand_location(arg, ctx.attr.srcs), ctx.var)
for arg in ctx.attr.cmd
]
# Add runfiles package dir to PYTHONPATH so scripts can import python_libs (e.g. gen_helper).
runfiles_package_dir = ctx.executable.python_binary.path + ".runfiles/" + ctx.workspace_name + "/" + ctx.label.package
env = {"PYTHONPATH": runfiles_package_dir}
ctx.actions.run(
executable = python.interpreter.path,
executable = ctx.executable.python_binary,
outputs = ctx.outputs.outputs,
inputs = depset(transitive = [python.files, depset([arg.files.to_list()[0] for arg in ctx.attr.srcs])] + python_libs),
inputs = depset(transitive = [depset([arg.files.to_list()[0] for arg in ctx.attr.srcs])]),
arguments = expanded_args,
env = {"PYTHONPATH": ctx.configuration.host_path_separator.join(python_path)},
env = env,
mnemonic = "TemplateRenderer",
)
@ -40,18 +36,26 @@ python_genrule_rule = rule(
"cmd": attr.string_list(
doc = "The command line arguments to pass to python",
),
"python_libs": attr.label_list(
providers = [PyInfo],
default = [],
"python_binary": attr.label(
executable = True,
cfg = "exec",
),
},
toolchains = ["@bazel_tools//tools/python:toolchain_type"],
toolchains = ["@rules_python//python:toolchain_type"],
output_to_genfiles = True,
)
def python_genrule(name, tags = [], **kwargs):
def python_genrule(name, python_file, python_libs = [], tags = [], **kwargs):
py_binary(
name = name + "_python",
srcs = [python_file],
main = python_file,
tags = tags + ["gen_source"],
deps = python_libs,
)
python_genrule_rule(
name = name,
tags = tags + ["gen_source"],
python_binary = name + "_python",
**kwargs
)

View File

@ -1,26 +1,22 @@
load("//bazel:utils.bzl", "write_target")
load("@rules_python//python:defs.bzl", "py_binary")
def render_template_impl(ctx):
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python_libs = [py_dep[PyInfo].transitive_sources for py_dep in ctx.attr.python_libs]
python_path = []
for py_dep in ctx.attr.python_libs:
for path in py_dep[PyInfo].imports.to_list():
if path not in python_path:
python_path.append(ctx.expand_make_variables("python_library_imports", "$(BINDIR)/external/" + path, ctx.var))
expanded_args = [
ctx.expand_make_variables("render_template_expand", ctx.expand_location(arg, ctx.attr.srcs), ctx.var)
for arg in ctx.attr.cmd
]
# Add runfiles package dir to PYTHONPATH so scripts can import python_libs (e.g. gen_helper).
runfiles_package_dir = ctx.executable.python_binary.path + ".runfiles/" + ctx.workspace_name + "/" + ctx.label.package
env = {"PYTHONPATH": runfiles_package_dir}
ctx.actions.run(
executable = python.interpreter.path,
executable = ctx.executable.python_binary,
outputs = [ctx.outputs.output],
inputs = depset(transitive = [python.files, depset([arg.files.to_list()[0] for arg in ctx.attr.srcs])] + python_libs),
inputs = depset(transitive = [depset([arg.files.to_list()[0] for arg in ctx.attr.srcs])]),
arguments = expanded_args,
env = {"PYTHONPATH": ctx.configuration.host_path_separator.join(python_path)},
env = env,
mnemonic = "TemplateRenderer",
)
@ -40,43 +36,49 @@ render_template_rule = rule(
"cmd": attr.string_list(
doc = "The command line arguments to pass to python",
),
"python_libs": attr.label_list(
providers = [PyInfo],
default = [],
"python_binary": attr.label(
executable = True,
cfg = "exec",
),
},
toolchains = ["@bazel_tools//tools/python:toolchain_type"],
output_to_genfiles = True,
)
def render_template(name, tags = [], **kwargs):
def render_template(name, srcs, cmd, output, python_file, python_libs = [], tags = [], **kwargs):
py_binary(
name = name + "_python",
srcs = [python_file],
main = python_file,
tags = tags + ["gen_source"],
deps = python_libs,
)
render_template_rule(
name = name,
srcs = srcs,
cmd = cmd,
output = output,
python_binary = name + "_python",
tags = tags + ["gen_source"],
**kwargs
)
def render_templates_impl(ctx):
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python_libs = [py_dep[PyInfo].transitive_sources for py_dep in ctx.attr.python_libs]
python_path = []
for py_dep in ctx.attr.python_libs:
for path in py_dep[PyInfo].imports.to_list():
if path not in python_path:
python_path.append(ctx.expand_make_variables("python_library_imports", "$(BINDIR)/external/" + path, ctx.var))
expanded_args = [
ctx.expand_make_variables("render_template_expand", ctx.expand_location(arg, ctx.attr.srcs), ctx.var)
for arg in ctx.attr.cmd
]
# Add runfiles package dir to PYTHONPATH so scripts can import python_libs (e.g. gen_helper).
runfiles_package_dir = ctx.executable.python_binary.path + ".runfiles/" + ctx.workspace_name + "/" + ctx.label.package
env = {"PYTHONPATH": runfiles_package_dir}
ctx.actions.run(
executable = python.interpreter.path,
executable = ctx.executable.python_binary,
outputs = ctx.outputs.outputs,
inputs = depset(transitive = [python.files, depset([arg.files.to_list()[0] for arg in ctx.attr.srcs])] + python_libs),
inputs = depset(transitive = [depset([arg.files.to_list()[0] for arg in ctx.attr.srcs])]),
arguments = expanded_args,
env = {"PYTHONPATH": ctx.configuration.host_path_separator.join(python_path)},
env = env,
mnemonic = "TemplateRenderer",
)
@ -96,18 +98,29 @@ render_templates_rule = rule(
"cmd": attr.string_list(
doc = "The command line arguments to pass to python",
),
"python_libs": attr.label_list(
providers = [PyInfo],
default = [],
"python_binary": attr.label(
executable = True,
cfg = "exec",
),
},
toolchains = ["@bazel_tools//tools/python:toolchain_type"],
output_to_genfiles = True,
)
def render_templates(name, tags = [], **kwargs):
def render_templates(name, srcs, cmd, outputs, python_file, python_libs = [], tags = [], **kwargs):
py_binary(
name = name + "_python",
srcs = [python_file],
main = python_file,
tags = tags + ["gen_source"],
deps = python_libs,
)
render_templates_rule(
name = name,
srcs = srcs,
cmd = cmd,
outputs = outputs,
python_binary = name + "_python",
tags = tags + ["gen_source"],
**kwargs
)

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary")
py_binary(
name = "generate_coverity_targets",
srcs = ["generate_coverity_targets.py"],

View File

@ -1,5 +1,6 @@
load("@aspect_rules_lint//format:defs.bzl", "format_multirun", "format_test")
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary")
py_binary(
name = "rules_lint_format_wrapper",

View File

@ -158,6 +158,10 @@ def main() -> int:
print("python buildscripts/install_bazel.py")
return 1
# aspect_rules_js js_binary launcher expects RUNFILES and Bazel on Linux sets RUNFILES_DIR.
if "RUNFILES_DIR" in os.environ and "RUNFILES" not in os.environ:
os.environ["RUNFILES"] = os.environ["RUNFILES_DIR"]
parser = argparse.ArgumentParser(
prog="Format", description="This script formats code in mongodb"
)

View File

@ -211,7 +211,7 @@ def mongo_install_rule_impl(ctx):
DefaultInfo: with dep files and output file
PackageFilesInfo: with a mapping for creating the archive
"""
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python = ctx.toolchains["@rules_python//python:toolchain_type"].py3_runtime
file_map = {
"binaries": {},
@ -432,7 +432,7 @@ mongo_install_rule = rule(
"_windows_constraint": attr.label(default = "@platforms//os:windows"),
},
doc = "Install targets",
toolchains = ["@bazel_tools//tools/python:toolchain_type"],
toolchains = ["@rules_python//python:toolchain_type"],
)
def mongo_install(

View File

@ -75,7 +75,7 @@ def mongo_msi_impl(ctx):
candle_arguments.append("-out")
candle_arguments.append(output_directory + "/")
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python = ctx.toolchains["@rules_python//python:toolchain_type"].py3_runtime
ctx.actions.run(
outputs = candle_out,
inputs = depset(transitive = [depset(candle_in), ctx.attr._candle_wrapper_script.files, python.files, ctx.attr._candle.files]),
@ -165,5 +165,5 @@ mongo_msi = rule(
),
},
doc = "Create a msi using wix toolset",
toolchains = ["@bazel_tools//tools/python:toolchain_type"],
toolchains = ["@rules_python//python:toolchain_type"],
)

View File

@ -23,7 +23,7 @@ def mongo_pretty_printer_test_impl(ctx):
script_output = ctx.actions.declare_file(pretty_printer_directory + short_name + ".py")
launcher_output = ctx.actions.declare_file(pretty_printer_directory + "pretty_printer_test_launcher_" + short_name + ".py")
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python = ctx.toolchains["@rules_python//python:toolchain_type"].py3_runtime
inputs = depset(transitive = [
ctx.attr._pretty_printer_creation_script.files,
@ -71,7 +71,7 @@ mongo_pretty_printer_test = rule(
"_pretty_printer_launcher_infile": attr.label(allow_single_file = True, default = "//src/mongo/util:pretty_printer_test_launcher.py.in"),
},
doc = "Create pretty printer tests",
toolchains = ["@bazel_tools//tools/python:toolchain_type"],
toolchains = ["@rules_python//python:toolchain_type"],
executable = True,
test = True,
)

View File

@ -14,7 +14,7 @@ def _py_cxx_wrapper(*, python_path, toolchain_path, python_interpreter, main_py)
])
def _py_cxx_test_impl(ctx):
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python = ctx.toolchains["@rules_python//python:toolchain_type"].py3_runtime
python_path = []
for dep in ctx.attr.deps:
@ -73,7 +73,7 @@ py_cxx_test = rule(
"data": attr.label_list(),
"toolchain_path": attr.string(mandatory = True),
},
toolchains = ["@bazel_tools//tools/cpp:toolchain_type", "@bazel_tools//tools/python:toolchain_type"],
toolchains = ["@bazel_tools//tools/cpp:toolchain_type", "@rules_python//python:toolchain_type"],
executable = True,
test = True,
)

View File

@ -966,7 +966,7 @@ def idl_generator_impl(ctx):
gen_source = ctx.actions.declare_file(base + "_gen.cpp")
gen_header = ctx.actions.declare_file(base + "_gen.h")
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python = ctx.toolchains["@rules_python//python:toolchain_type"].py3_runtime
dep_depsets = [dep[IdlInfo].idl_deps for dep in ctx.attr.deps]
# Transitive headers from deps + explicit hdrs attr
@ -1084,7 +1084,7 @@ idl_generator_rule = rule(
"gen_src": "%{name}.cpp",
},
doc = "Generates header/source files from IDL files.",
toolchains = ["@bazel_tools//tools/python:toolchain_type"],
toolchains = ["@rules_python//python:toolchain_type"],
fragments = ["py"],
)

View File

@ -19,7 +19,7 @@ def mongot_extension_signing_key():
mongot_extension_signing_key_repo(name = "mongot_extension_signing_key")
def _gpg_export_armored_key_impl(ctx):
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python = ctx.toolchains["@rules_python//python:toolchain_type"].py3_runtime
key = ctx.file.key
armored_key_output_file = ctx.outputs.armored_key_output_file
@ -91,12 +91,12 @@ gpg_export_armored_key = rule(
default = Label("@gpg//:gpg_libs"),
),
},
toolchains = ["@bazel_tools//tools/python:toolchain_type"],
toolchains = ["@rules_python//python:toolchain_type"],
fragments = ["py"],
)
def _generate_embedded_public_key_header_impl(ctx):
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python = ctx.toolchains["@rules_python//python:toolchain_type"].py3_runtime
script = ctx.file.script
public_key_path = ctx.file.public_key_path
@ -130,6 +130,6 @@ generate_embedded_public_key_header = rule(
allow_single_file = True,
),
},
toolchains = ["@bazel_tools//tools/python:toolchain_type"],
toolchains = ["@rules_python//python:toolchain_type"],
fragments = ["py"],
)

View File

@ -158,6 +158,8 @@ platform(
],
)
load("@rules_python//python:defs.bzl", "py_binary")
py_binary(
name = "remote_execution_containers_generator",
srcs = ["remote_execution_containers_generator.py"],

View File

@ -1,5 +1,6 @@
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "int_flag")
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
genrule(
name = "resmoke_mongo_version",

View File

@ -1,4 +1,5 @@
load("//bazel:test_exec_properties.bzl", "test_exec_properties")
load("@rules_python//python:defs.bzl", "py_test")
def resmoke_config_impl(ctx):
base_name = ctx.label.name.removesuffix("_config")
@ -6,7 +7,7 @@ def resmoke_config_impl(ctx):
generated_config_file = ctx.actions.declare_file(base_name + ".yml")
base_config_file = ctx.files.base_config[0]
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python = ctx.toolchains["@rules_python//python:toolchain_type"].py3_runtime
python_path = []
for path in ctx.attr.generator[PyInfo].imports.to_list():
if path not in python_path:
@ -68,7 +69,7 @@ resmoke_config = rule(
),
},
doc = "Generates a resmoke config YAML",
toolchains = ["@bazel_tools//tools/python:toolchain_type"],
toolchains = ["@rules_python//python:toolchain_type"],
)
def resmoke_suite_test(
@ -123,7 +124,7 @@ def resmoke_suite_test(
deps_path = ":".join(["$(location %s)" % dep for dep in deps])
native.py_test(
py_test(
name = name,
# To a user of resmoke_suite_test, the `srcs` is the list of tests to select. However, to the py_test rule,
# the `srcs` are expected to be Python files only.

View File

@ -5,7 +5,7 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_extension_shared_library")
def _gpg_sign_impl(ctx):
outs = []
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python = ctx.toolchains["@rules_python//python:toolchain_type"].py3_runtime
for src in ctx.files.srcs:
out = ctx.actions.declare_file(src.basename + ".sig")
@ -84,7 +84,7 @@ gpg_sign = rule(
default = Label("//bazel:gpg_signer.py"),
),
},
toolchains = ["@bazel_tools//tools/python:toolchain_type"],
toolchains = ["@rules_python//python:toolchain_type"],
fragments = ["py"],
)

View File

@ -65,7 +65,7 @@ def symbol_checker_aspect_impl(target, ctx):
OutputGroupInfo(symbol_checker = depset()),
]
python = ctx.toolchains["@bazel_tools//tools/python:toolchain_type"].py3_runtime
python = ctx.toolchains["@rules_python//python:toolchain_type"].py3_runtime
cc_toolchain = find_cpp_toolchain(ctx)
nm_bin = cc_toolchain.nm_executable
@ -154,7 +154,7 @@ symbol_checker_aspect = aspect(
),
},
toolchains = [
"@bazel_tools//tools/python:toolchain_type",
"@rules_python//python:toolchain_type",
"@bazel_tools//tools/cpp:toolchain_type",
],
attr_aspects = ["deps", "binary_with_debug"],

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary")
py_binary(
name = "mongo_toolchain_version_generator",
srcs = ["mongo_toolchain_version_generator.py"],

View File

@ -1,4 +1,4 @@
load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair")
load("@rules_python//python:defs.bzl", "py_runtime", "py_runtime_pair")
filegroup(
name = "files",
@ -37,5 +37,5 @@ toolchain(
exec_compatible_with = [{constraints}],
target_compatible_with = [{constraints}],
toolchain = ":py_runtime_pair",
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
toolchain_type = "@rules_python//python:toolchain_type",
)

View File

@ -90,7 +90,7 @@ def _py_download(ctx):
ctx.file("BUILD.bazel", """
# Stub toolchain - platform doesn't match host, not downloaded
load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair")
load("@rules_python//python:defs.bzl", "py_runtime_pair")
py_runtime_pair(
name = "runtime_pair",
@ -100,7 +100,7 @@ py_runtime_pair(
toolchain(
name = "python_toolchain",
toolchain_type = "@bazel_tools//tools/python:toolchain_type",
toolchain_type = "@rules_python//python:toolchain_type",
toolchain = ":runtime_pair",
exec_compatible_with = [
{constraints}

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library")
package(default_visibility = ["//visibility:public"])
py_library(

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary")
py_binary(
name = "codeowners",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary")
py_binary(
name = "engflow_auth",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
exports_files(["evergreen_git.py"])

View File

@ -2,6 +2,7 @@
load("//bazel:mongo_src_rules.bzl", "mongo_cc_binary", "mongo_cc_unit_test")
load("//bazel/resmoke:resmoke.bzl", "resmoke_suite_test")
load("@rules_python//python:defs.bzl", "py_test")
package(default_visibility = ["//visibility:public"])

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_library")
py_library(
name = "ciconfig",

View File

@ -1,4 +1,6 @@
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
load("@rules_python//python:defs.bzl", "py_library")
py_library(
name = "all_python_files",
srcs = glob(["*.py"]),

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
filegroup(
name = "idlc",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_library")
py_library(
name = "linter",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_library")
py_library(
name = "patch_builds",

View File

@ -6,16 +6,26 @@ Returns nonzero if poetry.lock and pyproject.toml are not synced
"""
import os
import subprocess
import runpy
import sys
POETRY_LOCK_V200 = (
"""# This file is automatically @generated by Poetry 2.0.0 and should not be changed by hand."""
)
REPO_ROOT = os.environ.get("BUILD_WORKSPACE_DIRECTORY", ".")
# This has a great error message as part of the failure case
subprocess.run(["python", "-m", "poetry", "check", "--lock"], check=True, cwd=REPO_ROOT)
old_argv = sys.argv
old_cwd = os.getcwd()
try:
sys.argv = ["poetry", "check", "--lock"]
os.chdir(REPO_ROOT)
runpy.run_module("poetry", run_name="__main__")
except SystemExit as e:
if e.code not in (None, 0):
raise
finally:
sys.argv = old_argv
os.chdir(old_cwd)
# Check if the poetry lock file was generated with poetry 2.0.0
with open(f"{REPO_ROOT}/poetry.lock", "r") as poetry_lock:

View File

@ -4,6 +4,7 @@
import argparse
import logging
import os
import runpy
import subprocess
import sys
@ -29,12 +30,18 @@ def is_interesting_file(filename: str) -> bool:
def lint(paths: list[str]):
"""Lint specified paths (files or directories) using Pyright."""
if "BUILD_WORKSPACE_DIRECTORY" in os.environ:
subprocess.run(
["python", "-m", "pyright", "-p", "pyproject.toml"] + paths,
env=os.environ,
check=True,
cwd=REPO_ROOT,
)
old_argv = sys.argv
old_cwd = os.getcwd()
try:
sys.argv = ["pyright", "-p", "pyproject.toml"] + paths
os.chdir(REPO_ROOT)
runpy.run_module("pyright", run_name="__main__")
except SystemExit as e:
if e.code not in (None, 0):
raise
finally:
sys.argv = old_argv
os.chdir(old_cwd)
return
lint_runner = runner.LintRunner()

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary")
py_binary(
name = "resmoke_proxy",
srcs = [

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_library")
py_library(
name = "resmokelib",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "core",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "discovery",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "extensions",
srcs = [

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "generate_fcv_constants",
srcs = [

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "generate_fuzz_config",
srcs = [

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
py_library(
name = "hang_analyzer",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "logging",
srcs = [

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "multiversion",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "powercycle",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "run",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "setup_multiversion",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "symbolizer",
srcs = [

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "testing",
srcs = glob(["**/*.py"]), # TODO: narrow this down

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "utils",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
py_library(
name = "hashes",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,5 +1,6 @@
load("@poetry//:dependencies.bzl", "dependency")
load("//bazel:mongo_script_rules.bzl", "mongo_toolchain_py_cxx_test")
load("@rules_python//python:defs.bzl", "py_library")
mongo_toolchain_py_cxx_test(
name = "test_clang_tidy",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_library", "py_test")
py_library(
name = "all_python_files",
srcs = glob(["*.py"]),

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_test(
name = "test_evergreen",
srcs = [

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_test")
py_test(
name = "test_suites_configurations",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_test(
name = "python_test",
srcs = ["python_test.py"],

View File

@ -1,4 +1,6 @@
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
load("@rules_python//python:defs.bzl", "py_library", "py_test")
py_library(
name = "all_python_files",
srcs = glob(["*.py"]),

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_test(
name = "test_discovery",
srcs = [

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_test(
name = "test_dumper",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
py_library(
name = "all_python_files",
srcs = glob(["*.py"]),

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary")
py_binary(
name = "test_sbom",
srcs = ["test_sbom.py"],

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_library")
py_library(
name = "timeout",

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
# TODO(SERVER-105817): The following library is autogenerated, please split these out into individual python targets
py_library(
name = "all_python_files",

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_library")
py_library(
name = "util",

View File

@ -2,6 +2,7 @@
"""YAML linters wrapper script for Bazel."""
import os
import runpy
import subprocess
import sys
@ -13,6 +14,20 @@ def run_command(cmd, **kwargs):
sys.exit(result.returncode)
def run_module(module_name, args):
old_argv = sys.argv
old_cwd = os.getcwd()
try:
sys.argv = [module_name] + args
runpy.run_module(module_name, run_name="__main__")
except SystemExit as e:
if e.code not in (None, 0):
sys.exit(e.code)
finally:
sys.argv = old_argv
os.chdir(old_cwd)
def main():
# Change to workspace root if running under Bazel
if "BUILD_WORKING_DIRECTORY" in os.environ:
@ -22,19 +37,9 @@ def main():
script_dir = os.path.dirname(os.path.abspath(__file__))
os.chdir(os.path.join(script_dir, ".."))
# Run yamllint as a Python module
run_command(
[
sys.executable,
"-m",
"yamllint",
"-c",
"etc/yamllint_config.yml",
"buildscripts",
"etc",
"jstests",
],
shell=False,
run_module(
"yamllint",
["-c", "etc/yamllint_config.yml", "buildscripts", "etc", "jstests"],
)
# Evaluate evergreen configs
@ -81,10 +86,7 @@ def main():
)
# Run evergreen-lint using module invocation
run_command(
[sys.executable, "-m", "evergreen_lint", "-c", "./etc/evergreen_lint.yml", "lint"],
shell=False,
)
run_module("evergreen_lint", ["-c", "./etc/evergreen_lint.yml", "lint"])
print("YAML linting completed successfully!")

View File

@ -1,4 +1,5 @@
load("@poetry//:dependencies.bzl", "dependency")
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
package(default_visibility = ["//visibility:public"])

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
package(default_visibility = ["//visibility:public"])
sh_binary(

View File

@ -1,3 +1,5 @@
load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
package(default_visibility = ["//visibility:public"])
sh_binary(

Some files were not shown because too many files have changed in this diff Show More