chore: move files out of private/common (#2285)
The "common" subdir was just carried over from the original file layout
in Bazel. It's not
necessary in rules_python. Remove it to simplify, since various newly
added code is
going directly into private, not into private/common.
diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel
index 66b6496..33d93fd 100644
--- a/docs/BUILD.bazel
+++ b/docs/BUILD.bazel
@@ -97,12 +97,12 @@
"//python/cc:py_cc_toolchain_bzl",
"//python/cc:py_cc_toolchain_info_bzl",
"//python/entry_points:py_console_script_binary_bzl",
+ "//python/private:py_binary_rule_bazel_bzl",
"//python/private:py_cc_toolchain_rule_bzl",
+ "//python/private:py_library_rule_bazel_bzl",
+ "//python/private:py_runtime_rule_bzl",
+ "//python/private:py_test_rule_bazel_bzl",
"//python/private/api:py_common_api_bzl",
- "//python/private/common:py_binary_rule_bazel_bzl",
- "//python/private/common:py_library_rule_bazel_bzl",
- "//python/private/common:py_runtime_rule_bzl",
- "//python/private/common:py_test_rule_bazel_bzl",
] + ([
# Bazel 6 + Stardoc isn't able to parse something about the python bzlmod extension
"//python/extensions:python_bzl",
diff --git a/docs/conf.py b/docs/conf.py
index d65d5b5..9d33782 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -59,7 +59,7 @@
autodoc2_docstring_parser_regexes = [
(".*", "myst"),
]
-
+
# NOTE: The redirects generation will clobber existing files.
redirects = {
"api/tools/precompiler/index": "/api/rules_python/tools/precompiler/index.html",
@@ -69,10 +69,10 @@
"api/python/defs": "/api/rules_python/python/defs.html",
"api/python/index": "/api/rules_python/python/index.html",
"api/python/py_runtime_info": "/api/rules_python/python/py_runtime_info.html",
- "api/python/private/common/py_library_rule_bazel": "/api/rules_python/python/private/common/py_library_rule_bazel.html",
- "api/python/private/common/py_test_rule_bazel": "/api/rules_python/python/private/common/py_test_rule_bazel.html",
- "api/python/private/common/py_binary_rule_bazel": "/api/rules_python/python/private/common/py_binary_rule_bazel.html",
- "api/python/private/common/py_runtime_rule": "/api/rules_python/python/private/common/py_runtime_rule.html",
+ "api/python/private/common/py_library_rule_bazel": "/api/rules_python/python/private/py_library_rule_bazel.html",
+ "api/python/private/common/py_test_rule_bazel": "/api/rules_python/python/private/py_test_rule_bazel.html",
+ "api/python/private/common/py_binary_rule_bazel": "/api/rules_python/python/private/py_binary_rule_bazel.html",
+ "api/python/private/common/py_runtime_rule": "/api/rules_python/python/private/py_runtime_rule.html",
"api/python/extensions/pip": "/api/rules_python/python/extensions/pip.html",
"api/python/extensions/python": "/api/rules_python/python/extensions/python.html",
"api/python/entry_points/py_console_script_binary": "/api/rules_python/python/entry_points/py_console_script_binary.html",
diff --git a/examples/bzlmod/MODULE.bazel.lock b/examples/bzlmod/MODULE.bazel.lock
index e292528..56854cc 100644
--- a/examples/bzlmod/MODULE.bazel.lock
+++ b/examples/bzlmod/MODULE.bazel.lock
@@ -17,6 +17,7 @@
"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.6.1/source.json": "082ed5f9837901fada8c68c2f3ddc958bb22b6d654f71dd73f3df30d45d4b749",
@@ -45,12 +46,14 @@
"https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5",
"https://bcr.bazel.build/modules/rules_cc/0.0.9/source.json": "1f1ba6fea244b616de4a554a0f4983c91a9301640c8fe0dd1d410254115c8430",
"https://bcr.bazel.build/modules/rules_java/4.0.0/MODULE.bazel": "5a78a7ae82cd1a33cef56dc578c7d2a46ed0dca12643ee45edbb8417899e6f74",
+ "https://bcr.bazel.build/modules/rules_java/6.3.0/MODULE.bazel": "a97c7678c19f236a956ad260d59c86e10a463badb7eb2eda787490f4c969b963",
"https://bcr.bazel.build/modules/rules_java/7.1.0/MODULE.bazel": "30d9135a2b6561c761bd67bd4990da591e6bdc128790ce3e7afd6a3558b2fb64",
"https://bcr.bazel.build/modules/rules_java/7.6.5/MODULE.bazel": "481164be5e02e4cab6e77a36927683263be56b7e36fef918b458d7a8a1ebadb1",
"https://bcr.bazel.build/modules/rules_java/7.6.5/source.json": "a805b889531d1690e3c72a7a7e47a870d00323186a9904b36af83aa3d053ee8d",
"https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7",
"https://bcr.bazel.build/modules/rules_jvm_external/5.1/MODULE.bazel": "33f6f999e03183f7d088c9be518a63467dfd0be94a11d0055fe2d210f89aa909",
- "https://bcr.bazel.build/modules/rules_jvm_external/5.1/source.json": "5abb45cc9beb27b77aec6a65a11855ef2b55d95dfdc358e9f312b78ae0ba32d5",
+ "https://bcr.bazel.build/modules/rules_jvm_external/5.2/MODULE.bazel": "d9351ba35217ad0de03816ef3ed63f89d411349353077348a45348b096615036",
+ "https://bcr.bazel.build/modules/rules_jvm_external/5.2/source.json": "10572111995bc349ce31c78f74b3c147f6b3233975c7fa5eff9211f6db0d34d9",
"https://bcr.bazel.build/modules/rules_license/0.0.3/MODULE.bazel": "627e9ab0247f7d1e05736b59dbb1b6871373de5ad31c3011880b4133cafd4bd0",
"https://bcr.bazel.build/modules/rules_license/0.0.7/MODULE.bazel": "088fbeb0b6a419005b89cf93fe62d9517c0a2b8bb56af3244af65ecfe37e7d5d",
"https://bcr.bazel.build/modules/rules_license/0.0.7/source.json": "355cc5737a0f294e560d52b1b7a6492d4fff2caf0bef1a315df5a298fca2d34a",
@@ -62,7 +65,8 @@
"https://bcr.bazel.build/modules/rules_proto/6.0.0-rc1/source.json": "8d8448e71706df7450ced227ca6b3812407ff5e2ccad74a43a9fbe79c84e34e0",
"https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8",
"https://bcr.bazel.build/modules/stardoc/0.5.3/MODULE.bazel": "c7f6948dae6999bf0db32c1858ae345f112cacf98f174c7a8bb707e41b974f1c",
- "https://bcr.bazel.build/modules/stardoc/0.5.3/source.json": "cd53fe968dc8cd98197c052db3db6d82562960c87b61e7a90ee96f8e4e0dda97",
+ "https://bcr.bazel.build/modules/stardoc/0.6.2/MODULE.bazel": "7060193196395f5dd668eda046ccbeacebfd98efc77fed418dbe2b82ffaa39fd",
+ "https://bcr.bazel.build/modules/stardoc/0.6.2/source.json": "d2ff8063b63b4a85e65fe595c4290f99717434fa9f95b4748a79a7d04dfed349",
"https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43",
"https://bcr.bazel.build/modules/upb/0.0.0-20230516-61a97ef/MODULE.bazel": "c0df5e35ad55e264160417fd0875932ee3c9dda63d9fccace35ac62f45e1b6f9",
"https://bcr.bazel.build/modules/upb/0.0.0-20230516-61a97ef/source.json": "b2150404947339e8b947c6b16baa39fa75657f4ddec5e37272c7b11c7ab533bc",
@@ -149,9 +153,10 @@
},
"@@rules_jvm_external~//:extensions.bzl%maven": {
"general": {
- "bzlTransitiveDigest": "4ijz6uc3T4E+d+U8LQv4EAt+8OqZNVY/lzvhLx3y1yg=",
- "usagesDigest": "WfVTcbopbu3jyxPgDWx1iqIv1QV6L/T7utvDxAj5k84=",
+ "bzlTransitiveDigest": "U98JuBYMWVrcyiXT1L6KAYSAA0chnjRZZloIUmNmZ7M=",
+ "usagesDigest": "1L6xElvJScwRWKMMza2Jyew+Iuz6EPOkfBMQmHYuNIk=",
"recordedFileInputs": {
+ "@@stardoc~//maven_install.json": "de0bfa778b4ed6aebb77509362dd87ab8d20fc7c7c18d2a7429cdfee03949a21",
"@@rules_jvm_external~//rules_jvm_external_deps_install.json": "3ab1f67b0de4815df110bc72ccd6c77882b3b21d3d1e0a84445847b6ce3235a3"
},
"recordedDirentsInputs": {},
@@ -199,8 +204,7 @@
"attributes": {
"sha256": "a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26",
"urls": [
- "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar",
- "https://maven.google.com/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar"
+ "https://repo1.maven.org/maven2/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar"
],
"downloaded_file_path": "com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar"
}
@@ -241,6 +245,42 @@
"downloaded_file_path": "com/google/cloud/google-cloud-storage/1.113.4/google-cloud-storage-1.113.4.jar"
}
},
+ "unpinned_stardoc_maven": {
+ "bzlFile": "@@rules_jvm_external~//:coursier.bzl",
+ "ruleClassName": "coursier_fetch",
+ "attributes": {
+ "repositories": [
+ "{ \"repo_url\": \"https://repo1.maven.org/maven2\" }"
+ ],
+ "artifacts": [
+ "{ \"group\": \"com.beust\", \"artifact\": \"jcommander\", \"version\": \"1.82\" }",
+ "{ \"group\": \"com.google.escapevelocity\", \"artifact\": \"escapevelocity\", \"version\": \"1.1\" }",
+ "{ \"group\": \"com.google.guava\", \"artifact\": \"guava\", \"version\": \"31.1-jre\" }",
+ "{ \"group\": \"com.google.truth\", \"artifact\": \"truth\", \"version\": \"1.1.3\" }",
+ "{ \"group\": \"junit\", \"artifact\": \"junit\", \"version\": \"4.13.2\" }"
+ ],
+ "fail_on_missing_checksum": true,
+ "fetch_sources": true,
+ "fetch_javadoc": false,
+ "excluded_artifacts": [],
+ "generate_compat_repositories": false,
+ "version_conflict_policy": "default",
+ "override_targets": {},
+ "strict_visibility": true,
+ "strict_visibility_value": [
+ "@@//visibility:private"
+ ],
+ "maven_install_json": "@@stardoc~//:maven_install.json",
+ "resolve_timeout": 600,
+ "jetify": false,
+ "jetify_include_list": [
+ "*"
+ ],
+ "use_starlark_android_rules": false,
+ "aar_import_bzl_label": "@build_bazel_rules_android//android:rules.bzl",
+ "duplicate_version_warning": "warn"
+ }
+ },
"io_grpc_grpc_context_1_33_1": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_file",
@@ -331,8 +371,7 @@
"attributes": {
"sha256": "21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b",
"urls": [
- "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar",
- "https://maven.google.com/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar"
+ "https://repo1.maven.org/maven2/com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar"
],
"downloaded_file_path": "com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar"
}
@@ -349,6 +388,17 @@
"downloaded_file_path": "software/amazon/awssdk/metrics-spi/2.17.183/metrics-spi-2.17.183.jar"
}
},
+ "com_google_escapevelocity_escapevelocity_1_1": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_file",
+ "attributes": {
+ "sha256": "37e76e4466836dedb864fb82355cd01c3bd21325ab642d89a0f759291b171231",
+ "urls": [
+ "https://repo1.maven.org/maven2/com/google/escapevelocity/escapevelocity/1.1/escapevelocity-1.1.jar"
+ ],
+ "downloaded_file_path": "com/google/escapevelocity/escapevelocity/1.1/escapevelocity-1.1.jar"
+ }
+ },
"org_reactivestreams_reactive_streams_1_0_3": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_file",
@@ -385,6 +435,17 @@
"downloaded_file_path": "io/netty/netty-transport/4.1.72.Final/netty-transport-4.1.72.Final.jar"
}
},
+ "com_beust_jcommander_1_82": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_file",
+ "attributes": {
+ "sha256": "deeac157c8de6822878d85d0c7bc8467a19cc8484d37788f7804f039dde280b1",
+ "urls": [
+ "https://repo1.maven.org/maven2/com/beust/jcommander/1.82/jcommander-1.82.jar"
+ ],
+ "downloaded_file_path": "com/beust/jcommander/1.82/jcommander-1.82.jar"
+ }
+ },
"io_netty_netty_codec_http2_4_1_72_Final": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_file",
@@ -588,8 +649,7 @@
"attributes": {
"sha256": "a42edc9cab792e39fe39bb94f3fca655ed157ff87a8af78e1d6ba5b07c4a00ab",
"urls": [
- "https://repo1.maven.org/maven2/com/google/guava/guava/31.1-jre/guava-31.1-jre.jar",
- "https://maven.google.com/com/google/guava/guava/31.1-jre/guava-31.1-jre.jar"
+ "https://repo1.maven.org/maven2/com/google/guava/guava/31.1-jre/guava-31.1-jre.jar"
],
"downloaded_file_path": "com/google/guava/guava/31.1-jre/guava-31.1-jre.jar"
}
@@ -618,6 +678,17 @@
"downloaded_file_path": "io/netty/netty-transport-native-unix-common/4.1.72.Final/netty-transport-native-unix-common-4.1.72.Final.jar"
}
},
+ "junit_junit_4_13_2": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_file",
+ "attributes": {
+ "sha256": "8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3",
+ "urls": [
+ "https://repo1.maven.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar"
+ ],
+ "downloaded_file_path": "junit/junit/4.13.2/junit-4.13.2.jar"
+ }
+ },
"io_opencensus_opencensus_contrib_http_util_0_24_0": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_file",
@@ -726,6 +797,17 @@
"downloaded_file_path": "org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0.jar"
}
},
+ "org_hamcrest_hamcrest_core_1_3": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_file",
+ "attributes": {
+ "sha256": "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9",
+ "urls": [
+ "https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
+ ],
+ "downloaded_file_path": "org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"
+ }
+ },
"com_google_cloud_google_cloud_core_http_1_93_10": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_file",
@@ -832,8 +914,7 @@
"attributes": {
"sha256": "721cb91842b46fa056847d104d5225c8b8e1e8b62263b993051e1e5a0137b7ec",
"urls": [
- "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.11.0/error_prone_annotations-2.11.0.jar",
- "https://maven.google.com/com/google/errorprone/error_prone_annotations/2.11.0/error_prone_annotations-2.11.0.jar"
+ "https://repo1.maven.org/maven2/com/google/errorprone/error_prone_annotations/2.11.0/error_prone_annotations-2.11.0.jar"
],
"downloaded_file_path": "com/google/errorprone/error_prone_annotations/2.11.0/error_prone_annotations-2.11.0.jar"
}
@@ -910,6 +991,51 @@
"downloaded_file_path": "software/amazon/awssdk/protocol-core/2.17.183/protocol-core-2.17.183.jar"
}
},
+ "stardoc_maven": {
+ "bzlFile": "@@rules_jvm_external~//:coursier.bzl",
+ "ruleClassName": "pinned_coursier_fetch",
+ "attributes": {
+ "repositories": [
+ "{ \"repo_url\": \"https://repo1.maven.org/maven2\" }"
+ ],
+ "artifacts": [
+ "{ \"group\": \"com.beust\", \"artifact\": \"jcommander\", \"version\": \"1.82\" }",
+ "{ \"group\": \"com.google.escapevelocity\", \"artifact\": \"escapevelocity\", \"version\": \"1.1\" }",
+ "{ \"group\": \"com.google.guava\", \"artifact\": \"guava\", \"version\": \"31.1-jre\" }",
+ "{ \"group\": \"com.google.truth\", \"artifact\": \"truth\", \"version\": \"1.1.3\" }",
+ "{ \"group\": \"junit\", \"artifact\": \"junit\", \"version\": \"4.13.2\" }"
+ ],
+ "fetch_sources": true,
+ "fetch_javadoc": false,
+ "generate_compat_repositories": false,
+ "maven_install_json": "@@stardoc~//:maven_install.json",
+ "override_targets": {},
+ "strict_visibility": true,
+ "strict_visibility_value": [
+ "@@//visibility:private"
+ ],
+ "jetify": false,
+ "jetify_include_list": [
+ "*"
+ ],
+ "additional_netrc_lines": [],
+ "fail_if_repin_required": true,
+ "use_starlark_android_rules": false,
+ "aar_import_bzl_label": "@build_bazel_rules_android//android:rules.bzl",
+ "duplicate_version_warning": "warn"
+ }
+ },
+ "com_google_truth_truth_1_1_3": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_file",
+ "attributes": {
+ "sha256": "fc0b67782289a2aabfddfdf99eff1dcd5edc890d49143fcd489214b107b8f4f3",
+ "urls": [
+ "https://repo1.maven.org/maven2/com/google/truth/truth/1.1.3/truth-1.1.3.jar"
+ ],
+ "downloaded_file_path": "com/google/truth/truth/1.1.3/truth-1.1.3.jar"
+ }
+ },
"org_checkerframework_checker_compat_qual_2_5_5": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_file",
@@ -934,6 +1060,17 @@
"downloaded_file_path": "com/google/apis/google-api-services-storage/v1-rev20200927-1.30.10/google-api-services-storage-v1-rev20200927-1.30.10.jar"
}
},
+ "org_ow2_asm_asm_9_1": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_file",
+ "attributes": {
+ "sha256": "cda4de455fab48ff0bcb7c48b4639447d4de859a7afc30a094a986f0936beba2",
+ "urls": [
+ "https://repo1.maven.org/maven2/org/ow2/asm/asm/9.1/asm-9.1.jar"
+ ],
+ "downloaded_file_path": "org/ow2/asm/asm/9.1/asm-9.1.jar"
+ }
+ },
"com_google_api_client_google_api_client_1_30_11": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_file",
@@ -1000,8 +1137,7 @@
"attributes": {
"sha256": "b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99",
"urls": [
- "https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar",
- "https://maven.google.com/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar"
+ "https://repo1.maven.org/maven2/com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar"
],
"downloaded_file_path": "com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar"
}
@@ -1042,6 +1178,17 @@
"downloaded_file_path": "software/amazon/awssdk/arns/2.17.183/arns-2.17.183.jar"
}
},
+ "com_google_auto_value_auto_value_annotations_1_8_1": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_file",
+ "attributes": {
+ "sha256": "37ec09b47d7ed35a99d13927db5c86fc9071f620f943ead5d757144698310852",
+ "urls": [
+ "https://repo1.maven.org/maven2/com/google/auto/value/auto-value-annotations/1.8.1/auto-value-annotations-1.8.1.jar"
+ ],
+ "downloaded_file_path": "com/google/auto/value/auto-value-annotations/1.8.1/auto-value-annotations-1.8.1.jar"
+ }
+ },
"com_google_code_gson_gson_2_9_0": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_file",
@@ -1072,8 +1219,7 @@
"attributes": {
"sha256": "766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7",
"urls": [
- "https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar",
- "https://maven.google.com/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar"
+ "https://repo1.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar"
],
"downloaded_file_path": "com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar"
}
@@ -1126,6 +1272,17 @@
"downloaded_file_path": "org/codehaus/plexus/plexus-utils/3.3.1/plexus-utils-3.3.1.jar"
}
},
+ "org_checkerframework_checker_qual_3_13_0": {
+ "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
+ "ruleClassName": "http_file",
+ "attributes": {
+ "sha256": "3ea0dcd73b4d6cb2fb34bd7ed4dad6db327a01ebad7db05eb7894076b3d64491",
+ "urls": [
+ "https://repo1.maven.org/maven2/org/checkerframework/checker-qual/3.13.0/checker-qual-3.13.0.jar"
+ ],
+ "downloaded_file_path": "org/checkerframework/checker-qual/3.13.0/checker-qual-3.13.0.jar"
+ }
+ },
"com_google_protobuf_protobuf_java_util_3_13_0": {
"bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl",
"ruleClassName": "http_file",
@@ -1204,7 +1361,7 @@
"@@rules_jvm_external~//:non-module-deps.bzl%non_module_deps": {
"general": {
"bzlTransitiveDigest": "l6SlNloqPvd60dcuPdWiJNi3g3jfK76fcZc0i/Yr0dQ=",
- "usagesDigest": "pX61d12AFioOtqChQDmxvlNGDYT69e5MrKT2E/S6TeQ=",
+ "usagesDigest": "hiuzyio8ny4T3UoEFpHaxXzNFc6OGUFvx5DDVLBBUmU=",
"recordedFileInputs": {},
"recordedDirentsInputs": {},
"envVariables": {},
diff --git a/python/BUILD.bazel b/python/BUILD.bazel
index e64ad8c..f2f3374 100644
--- a/python/BUILD.bazel
+++ b/python/BUILD.bazel
@@ -124,9 +124,9 @@
name = "py_binary_bzl",
srcs = ["py_binary.bzl"],
deps = [
+ "//python/private:py_binary_macro_bazel_bzl",
"//python/private:register_extension_info_bzl",
"//python/private:util_bzl",
- "//python/private/common:py_binary_macro_bazel_bzl",
"@rules_python_internal//:rules_python_config_bzl",
],
)
@@ -135,7 +135,7 @@
name = "py_cc_link_params_info_bzl",
srcs = ["py_cc_link_params_info.bzl"],
deps = [
- "//python/private/common:providers_bzl",
+ "//python/private:py_cc_link_params_info_bzl",
"@rules_python_internal//:rules_python_config_bzl",
],
)
@@ -178,9 +178,9 @@
name = "py_library_bzl",
srcs = ["py_library.bzl"],
deps = [
+ "//python/private:py_library_macro_bazel_bzl",
"//python/private:register_extension_info_bzl",
"//python/private:util_bzl",
- "//python/private/common:py_library_macro_bazel_bzl",
"@rules_python_internal//:rules_python_config_bzl",
],
)
@@ -189,8 +189,8 @@
name = "py_runtime_bzl",
srcs = ["py_runtime.bzl"],
deps = [
+ "//python/private:py_runtime_macro_bzl",
"//python/private:util_bzl",
- "//python/private/common:py_runtime_macro_bzl",
],
)
@@ -208,9 +208,9 @@
name = "py_runtime_info_bzl",
srcs = ["py_runtime_info.bzl"],
deps = [
+ "//python/private:py_runtime_info_bzl",
"//python/private:reexports_bzl",
"//python/private:util_bzl",
- "//python/private/common:providers_bzl",
"@rules_python_internal//:rules_python_config_bzl",
],
)
@@ -219,9 +219,9 @@
name = "py_test_bzl",
srcs = ["py_test.bzl"],
deps = [
+ "//python/private:py_test_macro_bazel_bzl",
"//python/private:register_extension_info_bzl",
"//python/private:util_bzl",
- "//python/private/common:py_test_macro_bazel_bzl",
"@rules_python_internal//:rules_python_config_bzl",
],
)
diff --git a/python/private/BUILD.bazel b/python/private/BUILD.bazel
index cee77c5..d3b9bf4 100644
--- a/python/private/BUILD.bazel
+++ b/python/private/BUILD.bazel
@@ -30,7 +30,6 @@
filegroup(
name = "distribution",
srcs = glob(["**"]) + [
- "//python/private/common:distribution",
"//python/private/proto:distribution",
"//python/private/pypi:distribution",
"//python/private/whl_filegroup:distribution",
@@ -53,6 +52,28 @@
)
bzl_library(
+ name = "attributes_bazel_bzl",
+ srcs = ["attributes_bazel.bzl"],
+ deps = ["//python/private:rules_cc_srcs_bzl"],
+)
+
+bzl_library(
+ name = "attributes_bzl",
+ srcs = ["attributes.bzl"],
+ deps = [
+ ":common_bzl",
+ ":py_internal_bzl",
+ ":semantics_bzl",
+ "//python/private:enum_bzl",
+ "//python/private:flags_bzl",
+ "//python/private:py_info_bzl",
+ "//python/private:reexports_bzl",
+ "//python/private:rules_cc_srcs_bzl",
+ "@bazel_skylib//rules:common_settings",
+ ],
+)
+
+bzl_library(
name = "auth_bzl",
srcs = ["auth.bzl"],
deps = [":bazel_tools_bzl"],
@@ -83,6 +104,39 @@
)
bzl_library(
+ name = "cc_helper_bzl",
+ srcs = ["cc_helper.bzl"],
+ deps = [":py_internal_bzl"],
+)
+
+bzl_library(
+ name = "common_bazel_bzl",
+ srcs = ["common_bazel.bzl"],
+ deps = [
+ ":attributes_bzl",
+ ":common_bzl",
+ ":py_internal_bzl",
+ "//python/private:py_cc_link_params_info_bzl",
+ "//python/private:py_interpreter_program_bzl",
+ "//python/private:toolchain_types_bzl",
+ "@bazel_skylib//lib:paths",
+ ],
+)
+
+bzl_library(
+ name = "common_bzl",
+ srcs = ["common.bzl"],
+ deps = [
+ ":cc_helper_bzl",
+ ":py_internal_bzl",
+ ":semantics_bzl",
+ "//python/private:py_info_bzl",
+ "//python/private:reexports_bzl",
+ "//python/private:rules_cc_srcs_bzl",
+ ],
+)
+
+bzl_library(
name = "config_settings_bzl",
srcs = ["config_settings.bzl"],
deps = [
@@ -160,18 +214,6 @@
)
bzl_library(
- name = "py_repositories_bzl",
- srcs = ["py_repositories.bzl"],
- deps = [
- ":bazel_tools_bzl",
- ":internal_config_repo_bzl",
- ":pythons_hub_bzl",
- "//python:versions_bzl",
- "//python/private/pypi:deps_bzl",
- ],
-)
-
-bzl_library(
name = "python_register_toolchains_bzl",
srcs = ["python_register_toolchains.bzl"],
deps = [
@@ -218,6 +260,35 @@
)
bzl_library(
+ name = "py_binary_macro_bazel_bzl",
+ srcs = ["py_binary_macro_bazel.bzl"],
+ deps = [
+ ":common_bzl",
+ ":py_binary_rule_bazel_bzl",
+ ],
+)
+
+bzl_library(
+ name = "py_binary_rule_bazel_bzl",
+ srcs = ["py_binary_rule_bazel.bzl"],
+ deps = [
+ ":attributes_bzl",
+ ":py_executable_bazel_bzl",
+ ":semantics_bzl",
+ "@bazel_skylib//lib:dicts",
+ ],
+)
+
+bzl_library(
+ name = "py_cc_link_params_info_bzl",
+ srcs = ["py_cc_link_params_info.bzl"],
+ deps = [
+ ":rules_cc_srcs_bzl",
+ ":util_bzl",
+ ],
+)
+
+bzl_library(
name = "py_cc_toolchain_macro_bzl",
srcs = ["py_cc_toolchain_macro.bzl"],
deps = [
@@ -265,13 +336,47 @@
":py_exec_tools_info_bzl",
":sentinel_bzl",
":toolchain_types_bzl",
- "//python/private/common:providers_bzl",
"@bazel_skylib//lib:paths",
"@bazel_skylib//rules:common_settings",
],
)
bzl_library(
+ name = "py_executable_bazel_bzl",
+ srcs = ["py_executable_bazel.bzl"],
+ deps = [
+ ":attributes_bazel_bzl",
+ ":common_bazel_bzl",
+ ":common_bzl",
+ ":py_executable_bzl",
+ ":py_internal_bzl",
+ ":semantics_bzl",
+ "//python/private:py_runtime_info_bzl",
+ ],
+)
+
+bzl_library(
+ name = "py_executable_bzl",
+ srcs = ["py_executable.bzl"],
+ deps = [
+ ":attributes_bzl",
+ ":cc_helper_bzl",
+ ":common_bzl",
+ ":py_internal_bzl",
+ "//python/private:flags_bzl",
+ "//python/private:py_cc_link_params_info_bzl",
+ "//python/private:py_executable_info_bzl",
+ "//python/private:py_info_bzl",
+ "//python/private:py_runtime_info_bzl",
+ "//python/private:rules_cc_srcs_bzl",
+ "//python/private:toolchain_types_bzl",
+ "@bazel_skylib//lib:dicts",
+ "@bazel_skylib//lib:structs",
+ "@bazel_skylib//rules:common_settings",
+ ],
+)
+
+bzl_library(
name = "py_executable_info_bzl",
srcs = ["py_executable_info.bzl"],
)
@@ -288,12 +393,50 @@
)
bzl_library(
+ name = "py_internal_bzl",
+ srcs = ["py_internal.bzl"],
+ deps = ["@rules_python_internal//:py_internal_bzl"],
+)
+
+bzl_library(
name = "py_interpreter_program_bzl",
srcs = ["py_interpreter_program.bzl"],
deps = ["@bazel_skylib//rules:common_settings"],
)
bzl_library(
+ name = "py_library_bzl",
+ srcs = ["py_library.bzl"],
+ deps = [
+ ":attributes_bzl",
+ ":common_bzl",
+ ":py_internal_bzl",
+ "//python/private:flags_bzl",
+ "//python/private:py_cc_link_params_info_bzl",
+ "//python/private:toolchain_types_bzl",
+ "@bazel_skylib//lib:dicts",
+ "@bazel_skylib//rules:common_settings",
+ ],
+)
+
+bzl_library(
+ name = "py_library_macro_bazel_bzl",
+ srcs = ["py_library_macro_bazel.bzl"],
+ deps = [":py_library_rule_bazel_bzl"],
+)
+
+bzl_library(
+ name = "py_library_rule_bazel_bzl",
+ srcs = ["py_library_rule_bazel.bzl"],
+ deps = [
+ ":attributes_bazel_bzl",
+ ":common_bazel_bzl",
+ ":common_bzl",
+ ":py_library_bzl",
+ ],
+)
+
+bzl_library(
name = "py_package_bzl",
srcs = ["py_package.bzl"],
visibility = ["//:__subpackages__"],
@@ -304,6 +447,44 @@
)
bzl_library(
+ name = "py_runtime_info_bzl",
+ srcs = ["py_runtime_info.bzl"],
+ deps = [":util_bzl"],
+)
+
+bzl_library(
+ name = "py_repositories_bzl",
+ srcs = ["py_repositories.bzl"],
+ deps = [
+ ":bazel_tools_bzl",
+ ":internal_config_repo_bzl",
+ ":pythons_hub_bzl",
+ "//python:versions_bzl",
+ "//python/private/pypi:deps_bzl",
+ ],
+)
+
+bzl_library(
+ name = "py_runtime_macro_bzl",
+ srcs = ["py_runtime_macro.bzl"],
+ deps = [":py_runtime_rule_bzl"],
+)
+
+bzl_library(
+ name = "py_runtime_rule_bzl",
+ srcs = ["py_runtime_rule.bzl"],
+ deps = [
+ ":py_runtime_info_bzl",
+ ":reexports_bzl",
+ ":util_bzl",
+ "//python/private:attributes_bzl",
+ "//python/private:py_internal_bzl",
+ "@bazel_skylib//lib:dicts",
+ "@bazel_skylib//lib:paths",
+ ],
+)
+
+bzl_library(
name = "py_runtime_pair_macro_bzl",
srcs = ["py_runtime_pair_macro.bzl"],
visibility = ["//:__subpackages__"],
@@ -321,6 +502,27 @@
)
bzl_library(
+ name = "py_test_macro_bazel_bzl",
+ srcs = ["py_test_macro_bazel.bzl"],
+ deps = [
+ ":common_bazel_bzl",
+ ":py_test_rule_bazel_bzl",
+ ],
+)
+
+bzl_library(
+ name = "py_test_rule_bazel_bzl",
+ srcs = ["py_test_rule_bazel.bzl"],
+ deps = [
+ ":attributes_bzl",
+ ":common_bzl",
+ ":py_executable_bazel_bzl",
+ ":semantics_bzl",
+ "@bazel_skylib//lib:dicts",
+ ],
+)
+
+bzl_library(
name = "py_toolchain_suite_bzl",
srcs = ["py_toolchain_suite.bzl"],
deps = [
@@ -434,6 +636,11 @@
deps = [":bazel_tools_bzl"],
)
+bzl_library(
+ name = "semantics_bzl",
+ srcs = ["semantics.bzl"],
+)
+
# Needed to define bzl_library targets for docgen. (We don't define the
# bzl_library target here because it'd give our users a transitive dependency
# on Skylib.)
diff --git a/python/private/common/attributes.bzl b/python/private/attributes.bzl
similarity index 98%
rename from python/private/common/attributes.bzl
rename to python/private/attributes.bzl
index 56e8a66..424a2c5 100644
--- a/python/private/common/attributes.bzl
+++ b/python/private/attributes.bzl
@@ -15,12 +15,12 @@
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
load("@rules_cc//cc:defs.bzl", "CcInfo")
-load("//python/private:enum.bzl", "enum")
-load("//python/private:flags.bzl", "PrecompileFlag", "PrecompileSourceRetentionFlag")
-load("//python/private:py_info.bzl", "PyInfo")
-load("//python/private:reexports.bzl", "BuiltinPyInfo")
load(":common.bzl", "union_attrs")
+load(":enum.bzl", "enum")
+load(":flags.bzl", "PrecompileFlag", "PrecompileSourceRetentionFlag")
+load(":py_info.bzl", "PyInfo")
load(":py_internal.bzl", "py_internal")
+load(":reexports.bzl", "BuiltinPyInfo")
load(
":semantics.bzl",
"DEPS_ATTR_ALLOW_RULES",
diff --git a/python/private/common/attributes_bazel.bzl b/python/private/attributes_bazel.bzl
similarity index 100%
rename from python/private/common/attributes_bazel.bzl
rename to python/private/attributes_bazel.bzl
diff --git a/python/private/common/cc_helper.bzl b/python/private/cc_helper.bzl
similarity index 100%
rename from python/private/common/cc_helper.bzl
rename to python/private/cc_helper.bzl
diff --git a/python/private/common/common.bzl b/python/private/common.bzl
similarity index 98%
rename from python/private/common/common.bzl
rename to python/private/common.bzl
index ec46ea8..2dcc948 100644
--- a/python/private/common/common.bzl
+++ b/python/private/common.bzl
@@ -13,10 +13,10 @@
# limitations under the License.
"""Various things common to Bazel and Google rule implementations."""
-load("//python/private:py_info.bzl", "PyInfo", "PyInfoBuilder")
-load("//python/private:reexports.bzl", "BuiltinPyInfo")
load(":cc_helper.bzl", "cc_helper")
+load(":py_info.bzl", "PyInfo", "PyInfoBuilder")
load(":py_internal.bzl", "py_internal")
+load(":reexports.bzl", "BuiltinPyInfo")
load(
":semantics.bzl",
"NATIVE_RULES_MIGRATION_FIX_CMD",
@@ -173,7 +173,7 @@
runfiles.
cc_toolchain: CcToolchain that should be used when building.
feature_config: struct from cc_configure_features(); see
- //python/private/common:py_executable.bzl%cc_configure_features.
+ //python/private:py_executable.bzl%cc_configure_features.
**kwargs: Additional keys/values to set in the returned struct. This is to
facilitate extensions with less patching. Any added fields should
pick names that are unlikely to collide if the CcDetails API has
diff --git a/python/private/common/BUILD.bazel b/python/private/common/BUILD.bazel
deleted file mode 100644
index 6fef8e8..0000000
--- a/python/private/common/BUILD.bazel
+++ /dev/null
@@ -1,228 +0,0 @@
-# Copyright 2023 The Bazel Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
-
-package(
- default_visibility = ["//:__subpackages__"],
-)
-
-bzl_library(
- name = "attributes_bazel_bzl",
- srcs = ["attributes_bazel.bzl"],
- deps = ["//python/private:rules_cc_srcs_bzl"],
-)
-
-bzl_library(
- name = "attributes_bzl",
- srcs = ["attributes.bzl"],
- deps = [
- ":common_bzl",
- ":py_internal_bzl",
- ":semantics_bzl",
- "//python/private:enum_bzl",
- "//python/private:flags_bzl",
- "//python/private:py_info_bzl",
- "//python/private:reexports_bzl",
- "//python/private:rules_cc_srcs_bzl",
- "@bazel_skylib//rules:common_settings",
- ],
-)
-
-bzl_library(
- name = "cc_helper_bzl",
- srcs = ["cc_helper.bzl"],
- deps = [":py_internal_bzl"],
-)
-
-bzl_library(
- name = "common_bazel_bzl",
- srcs = ["common_bazel.bzl"],
- deps = [
- ":attributes_bzl",
- ":common_bzl",
- ":providers_bzl",
- ":py_internal_bzl",
- "//python/private:py_interpreter_program_bzl",
- "//python/private:toolchain_types_bzl",
- "@bazel_skylib//lib:paths",
- ],
-)
-
-bzl_library(
- name = "common_bzl",
- srcs = ["common.bzl"],
- deps = [
- ":cc_helper_bzl",
- ":providers_bzl",
- ":py_internal_bzl",
- ":semantics_bzl",
- "//python/private:py_info_bzl",
- "//python/private:reexports_bzl",
- "//python/private:rules_cc_srcs_bzl",
- ],
-)
-
-filegroup(
- name = "distribution",
- srcs = glob(["**"]),
-)
-
-bzl_library(
- name = "providers_bzl",
- srcs = ["providers.bzl"],
- deps = [
- ":semantics_bzl",
- "//python/private:rules_cc_srcs_bzl",
- "//python/private:util_bzl",
- ],
-)
-
-bzl_library(
- name = "py_binary_macro_bazel_bzl",
- srcs = ["py_binary_macro_bazel.bzl"],
- deps = [
- ":common_bzl",
- ":py_binary_rule_bazel_bzl",
- ],
-)
-
-bzl_library(
- name = "py_binary_rule_bazel_bzl",
- srcs = ["py_binary_rule_bazel.bzl"],
- deps = [
- ":attributes_bzl",
- ":py_executable_bazel_bzl",
- ":semantics_bzl",
- "@bazel_skylib//lib:dicts",
- ],
-)
-
-bzl_library(
- name = "py_executable_bazel_bzl",
- srcs = ["py_executable_bazel.bzl"],
- deps = [
- ":attributes_bazel_bzl",
- ":common_bazel_bzl",
- ":common_bzl",
- ":providers_bzl",
- ":py_executable_bzl",
- ":py_internal_bzl",
- ":semantics_bzl",
- ],
-)
-
-bzl_library(
- name = "py_executable_bzl",
- srcs = ["py_executable.bzl"],
- deps = [
- ":attributes_bzl",
- ":cc_helper_bzl",
- ":common_bzl",
- ":providers_bzl",
- ":py_internal_bzl",
- "//python/private:flags_bzl",
- "//python/private:py_executable_info_bzl",
- "//python/private:py_info_bzl",
- "//python/private:rules_cc_srcs_bzl",
- "//python/private:toolchain_types_bzl",
- "@bazel_skylib//lib:dicts",
- "@bazel_skylib//lib:structs",
- "@bazel_skylib//rules:common_settings",
- ],
-)
-
-bzl_library(
- name = "py_internal_bzl",
- srcs = ["py_internal.bzl"],
- deps = ["@rules_python_internal//:py_internal_bzl"],
-)
-
-bzl_library(
- name = "py_library_bzl",
- srcs = ["py_library.bzl"],
- deps = [
- ":attributes_bzl",
- ":common_bzl",
- ":providers_bzl",
- ":py_internal_bzl",
- "//python/private:flags_bzl",
- "//python/private:toolchain_types_bzl",
- "@bazel_skylib//lib:dicts",
- "@bazel_skylib//rules:common_settings",
- ],
-)
-
-bzl_library(
- name = "py_library_macro_bazel_bzl",
- srcs = ["py_library_macro_bazel.bzl"],
- deps = [":py_library_rule_bazel_bzl"],
-)
-
-bzl_library(
- name = "py_library_rule_bazel_bzl",
- srcs = ["py_library_rule_bazel.bzl"],
- deps = [
- ":attributes_bazel_bzl",
- ":common_bazel_bzl",
- ":common_bzl",
- ":py_library_bzl",
- ],
-)
-
-bzl_library(
- name = "py_runtime_macro_bzl",
- srcs = ["py_runtime_macro.bzl"],
- deps = [":py_runtime_rule_bzl"],
-)
-
-bzl_library(
- name = "py_runtime_rule_bzl",
- srcs = ["py_runtime_rule.bzl"],
- deps = [
- ":attributes_bzl",
- ":providers_bzl",
- ":py_internal_bzl",
- "//python/private:reexports_bzl",
- "//python/private:util_bzl",
- "@bazel_skylib//lib:dicts",
- "@bazel_skylib//lib:paths",
- ],
-)
-
-bzl_library(
- name = "py_test_macro_bazel_bzl",
- srcs = ["py_test_macro_bazel.bzl"],
- deps = [
- ":common_bazel_bzl",
- ":py_test_rule_bazel_bzl",
- ],
-)
-
-bzl_library(
- name = "py_test_rule_bazel_bzl",
- srcs = ["py_test_rule_bazel.bzl"],
- deps = [
- ":attributes_bzl",
- ":common_bzl",
- ":py_executable_bazel_bzl",
- ":semantics_bzl",
- "@bazel_skylib//lib:dicts",
- ],
-)
-
-bzl_library(
- name = "semantics_bzl",
- srcs = ["semantics.bzl"],
-)
diff --git a/python/private/common/common_bazel.bzl b/python/private/common_bazel.bzl
similarity index 96%
rename from python/private/common/common_bazel.bzl
rename to python/private/common_bazel.bzl
index 6148fc2..642cfd8 100644
--- a/python/private/common/common_bazel.bzl
+++ b/python/private/common_bazel.bzl
@@ -16,13 +16,13 @@
load("@bazel_skylib//lib:paths.bzl", "paths")
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
load("@rules_cc//cc:defs.bzl", "CcInfo", "cc_common")
-load("//python/private:flags.bzl", "PrecompileFlag")
-load("//python/private:py_interpreter_program.bzl", "PyInterpreterProgramInfo")
-load("//python/private:toolchain_types.bzl", "EXEC_TOOLS_TOOLCHAIN_TYPE", "TARGET_TOOLCHAIN_TYPE")
load(":attributes.bzl", "PrecompileAttr", "PrecompileInvalidationModeAttr", "PrecompileSourceRetentionAttr")
load(":common.bzl", "is_bool")
-load(":providers.bzl", "PyCcLinkParamsProvider")
+load(":flags.bzl", "PrecompileFlag")
+load(":py_cc_link_params_info.bzl", "PyCcLinkParamsInfo")
load(":py_internal.bzl", "py_internal")
+load(":py_interpreter_program.bzl", "PyInterpreterProgramInfo")
+load(":toolchain_types.bzl", "EXEC_TOOLS_TOOLCHAIN_TYPE", "TARGET_TOOLCHAIN_TYPE")
_py_builtins = py_internal
@@ -45,8 +45,8 @@
if CcInfo in dep:
cc_infos.append(dep[CcInfo])
- if PyCcLinkParamsProvider in dep:
- cc_infos.append(dep[PyCcLinkParamsProvider].cc_info)
+ if PyCcLinkParamsInfo in dep:
+ cc_infos.append(dep[PyCcLinkParamsInfo].cc_info)
return cc_common.merge_cc_infos(cc_infos = cc_infos)
diff --git a/python/private/flags.bzl b/python/private/flags.bzl
index e7643fc..c190cf6 100644
--- a/python/private/flags.bzl
+++ b/python/private/flags.bzl
@@ -19,7 +19,7 @@
"""
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
-load("//python/private:enum.bzl", "enum")
+load(":enum.bzl", "enum")
def _FlagEnum_flag_values(self):
return sorted(self.__members__.values())
diff --git a/python/private/local_runtime_repo.bzl b/python/private/local_runtime_repo.bzl
index 4e7edde..fb1a8e2 100644
--- a/python/private/local_runtime_repo.bzl
+++ b/python/private/local_runtime_repo.bzl
@@ -14,7 +14,7 @@
"""Create a repository for a locally installed Python runtime."""
-load("//python/private:enum.bzl", "enum")
+load(":enum.bzl", "enum")
load(":repo_utils.bzl", "REPO_DEBUG_ENV_VAR", "repo_utils")
# buildifier: disable=name-conventions
diff --git a/python/private/local_runtime_toolchains_repo.bzl b/python/private/local_runtime_toolchains_repo.bzl
index 880fbfe..adb3bb5 100644
--- a/python/private/local_runtime_toolchains_repo.bzl
+++ b/python/private/local_runtime_toolchains_repo.bzl
@@ -14,8 +14,8 @@
"""Create a repository to hold a local Python toolchain definitions."""
-load("//python/private:text_util.bzl", "render")
load(":repo_utils.bzl", "REPO_DEBUG_ENV_VAR", "repo_utils")
+load(":text_util.bzl", "render")
_TOOLCHAIN_TEMPLATE = """
# Generated by local_runtime_toolchains_repo.bzl
diff --git a/python/private/common/py_binary_macro_bazel.bzl b/python/private/py_binary_macro_bazel.bzl
similarity index 100%
rename from python/private/common/py_binary_macro_bazel.bzl
rename to python/private/py_binary_macro_bazel.bzl
diff --git a/python/private/common/py_binary_rule_bazel.bzl b/python/private/py_binary_rule_bazel.bzl
similarity index 100%
rename from python/private/common/py_binary_rule_bazel.bzl
rename to python/private/py_binary_rule_bazel.bzl
diff --git a/python/private/common/providers.bzl b/python/private/py_cc_link_params_info.bzl
similarity index 97%
rename from python/private/common/providers.bzl
rename to python/private/py_cc_link_params_info.bzl
index b704ce0..e5f4534 100644
--- a/python/private/common/providers.bzl
+++ b/python/private/py_cc_link_params_info.bzl
@@ -14,7 +14,7 @@
"""Providers for Python rules."""
load("@rules_cc//cc:defs.bzl", "CcInfo")
-load("//python/private:util.bzl", "define_bazel_6_provider")
+load(":util.bzl", "define_bazel_6_provider")
DEFAULT_STUB_SHEBANG = "#!/usr/bin/env python3"
@@ -300,17 +300,17 @@
},
)
-def _PyCcLinkParamsProvider_init(cc_info):
+def _PyCcLinkParamsInfo_init(cc_info):
return {
"cc_info": CcInfo(linking_context = cc_info.linking_context),
}
# buildifier: disable=name-conventions
-PyCcLinkParamsProvider, _unused_raw_py_cc_link_params_provider_ctor = define_bazel_6_provider(
+PyCcLinkParamsInfo, _unused_raw_py_cc_link_params_provider_ctor = define_bazel_6_provider(
doc = ("Python-wrapper to forward {obj}`CcInfo.linking_context`. This is to " +
"allow Python targets to propagate C++ linking information, but " +
"without the Python target appearing to be a valid C++ rule dependency"),
- init = _PyCcLinkParamsProvider_init,
+ init = _PyCcLinkParamsInfo_init,
fields = {
"cc_info": """
:type: CcInfo
diff --git a/python/private/py_exec_tools_toolchain.bzl b/python/private/py_exec_tools_toolchain.bzl
index 957448f..edf9159 100644
--- a/python/private/py_exec_tools_toolchain.bzl
+++ b/python/private/py_exec_tools_toolchain.bzl
@@ -16,9 +16,9 @@
load("@bazel_skylib//lib:paths.bzl", "paths")
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
-load("//python/private:sentinel.bzl", "SentinelInfo")
-load("//python/private:toolchain_types.bzl", "TARGET_TOOLCHAIN_TYPE")
load(":py_exec_tools_info.bzl", "PyExecToolsInfo")
+load(":sentinel.bzl", "SentinelInfo")
+load(":toolchain_types.bzl", "TARGET_TOOLCHAIN_TYPE")
def _py_exec_tools_toolchain_impl(ctx):
extra_kwargs = {}
@@ -43,7 +43,7 @@
Provides a toolchain for build time tools.
This provides `ToolchainInfo` with the following attributes:
-* `exec_tools`: {type}`PyExecToolsInfo`
+* `exec_tools`: {type}`PyExecToolsInfo`
* `toolchain_label`: {type}`Label` _only present when `--visibile_for_testing=True`
for internal testing_. The rule's label; this allows identifying what toolchain
implmentation was selected for testing purposes.
diff --git a/python/private/common/py_executable.bzl b/python/private/py_executable.bzl
similarity index 98%
rename from python/private/common/py_executable.bzl
rename to python/private/py_executable.bzl
index 6c238a2..00d8d36 100644
--- a/python/private/common/py_executable.bzl
+++ b/python/private/py_executable.bzl
@@ -17,15 +17,6 @@
load("@bazel_skylib//lib:structs.bzl", "structs")
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
load("@rules_cc//cc:defs.bzl", "cc_common")
-load("//python/private:builders.bzl", "builders")
-load("//python/private:py_executable_info.bzl", "PyExecutableInfo")
-load("//python/private:py_info.bzl", "PyInfo")
-load("//python/private:reexports.bzl", "BuiltinPyInfo", "BuiltinPyRuntimeInfo")
-load(
- "//python/private:toolchain_types.bzl",
- "EXEC_TOOLS_TOOLCHAIN_TYPE",
- TOOLCHAIN_TYPE = "TARGET_TOOLCHAIN_TYPE",
-)
load(
":attributes.bzl",
"AGNOSTIC_EXECUTABLE_ATTRS",
@@ -38,6 +29,7 @@
"create_srcs_attr",
"create_srcs_version_attr",
)
+load(":builders.bzl", "builders")
load(":cc_helper.bzl", "cc_helper")
load(
":common.bzl",
@@ -52,12 +44,12 @@
"target_platform_has_any_constraint",
"union_attrs",
)
-load(
- ":providers.bzl",
- "PyCcLinkParamsProvider",
- "PyRuntimeInfo",
-)
+load(":py_cc_link_params_info.bzl", "PyCcLinkParamsInfo")
+load(":py_executable_info.bzl", "PyExecutableInfo")
+load(":py_info.bzl", "PyInfo")
load(":py_internal.bzl", "py_internal")
+load(":py_runtime_info.bzl", "PyRuntimeInfo")
+load(":reexports.bzl", "BuiltinPyInfo", "BuiltinPyRuntimeInfo")
load(
":semantics.bzl",
"ALLOWED_MAIN_EXTENSIONS",
@@ -65,6 +57,11 @@
"IS_BAZEL",
"PY_RUNTIME_ATTR_NAME",
)
+load(
+ ":toolchain_types.bzl",
+ "EXEC_TOOLS_TOOLCHAIN_TYPE",
+ TOOLCHAIN_TYPE = "TARGET_TOOLCHAIN_TYPE",
+)
_py_builtins = py_internal
@@ -842,7 +839,7 @@
runfiles_details: runfiles that will become the default and data runfiles.
imports: depset of strings; the import paths to propagate
cc_info: optional CcInfo; Linking information to propagate as
- PyCcLinkParamsProvider. Note that only the linking information
+ PyCcLinkParamsInfo. Note that only the linking information
is propagated, not the whole CcInfo.
inherited_environment: list of strings; Environment variable names
that should be inherited from the environment the executuble
@@ -903,11 +900,11 @@
bootstrap_template = py_runtime_info.bootstrap_template,
))
- # TODO(b/163083591): Remove the PyCcLinkParamsProvider once binaries-in-deps
+ # TODO(b/163083591): Remove the PyCcLinkParamsInfo once binaries-in-deps
# are cleaned up.
if cc_info:
providers.append(
- PyCcLinkParamsProvider(cc_info = cc_info),
+ PyCcLinkParamsInfo(cc_info = cc_info),
)
py_info, deps_transitive_sources, builtin_py_info = create_py_info(
diff --git a/python/private/common/py_executable_bazel.bzl b/python/private/py_executable_bazel.bzl
similarity index 98%
rename from python/private/common/py_executable_bazel.bzl
rename to python/private/py_executable_bazel.bzl
index dae1c4a..53206bd 100644
--- a/python/private/common/py_executable_bazel.bzl
+++ b/python/private/py_executable_bazel.bzl
@@ -15,8 +15,6 @@
load("@bazel_skylib//lib:dicts.bzl", "dicts")
load("@bazel_skylib//lib:paths.bzl", "paths")
-load("//python/private:flags.bzl", "BootstrapImplFlag")
-load("//python/private:toolchain_types.bzl", "TARGET_TOOLCHAIN_TYPE")
load(":attributes_bazel.bzl", "IMPORTS_ATTRS")
load(
":common.bzl",
@@ -27,13 +25,15 @@
"union_attrs",
)
load(":common_bazel.bzl", "collect_cc_info", "get_imports", "maybe_precompile")
-load(":providers.bzl", "DEFAULT_STUB_SHEBANG")
+load(":flags.bzl", "BootstrapImplFlag")
load(
":py_executable.bzl",
"create_base_executable_rule",
"py_executable_base_impl",
)
load(":py_internal.bzl", "py_internal")
+load(":py_runtime_info.bzl", "DEFAULT_STUB_SHEBANG")
+load(":toolchain_types.bzl", "TARGET_TOOLCHAIN_TYPE")
_py_builtins = py_internal
_EXTERNAL_PATH_PREFIX = "external"
diff --git a/python/private/py_info.bzl b/python/private/py_info.bzl
index 6c2c3c6..7a0bdea 100644
--- a/python/private/py_info.bzl
+++ b/python/private/py_info.bzl
@@ -14,8 +14,8 @@
"""Implementation of PyInfo provider and PyInfo-specific utilities."""
load("@rules_python_internal//:rules_python_config.bzl", "config")
-load("//python/private:reexports.bzl", "BuiltinPyInfo")
load(":builders.bzl", "builders")
+load(":reexports.bzl", "BuiltinPyInfo")
load(":util.bzl", "define_bazel_6_provider")
def _check_arg_type(name, required_type, value):
diff --git a/python/private/common/py_internal.bzl b/python/private/py_internal.bzl
similarity index 100%
rename from python/private/common/py_internal.bzl
rename to python/private/py_internal.bzl
diff --git a/python/private/common/py_library.bzl b/python/private/py_library.bzl
similarity index 95%
rename from python/private/common/py_library.bzl
rename to python/private/py_library.bzl
index bce18c3..4f43116 100644
--- a/python/private/common/py_library.bzl
+++ b/python/private/py_library.bzl
@@ -15,13 +15,6 @@
load("@bazel_skylib//lib:dicts.bzl", "dicts")
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
-load("//python/private:builders.bzl", "builders")
-load("//python/private:flags.bzl", "AddSrcsToRunfilesFlag", "PrecompileFlag")
-load(
- "//python/private:toolchain_types.bzl",
- "EXEC_TOOLS_TOOLCHAIN_TYPE",
- TOOLCHAIN_TYPE = "TARGET_TOOLCHAIN_TYPE",
-)
load(
":attributes.bzl",
"COMMON_ATTRS",
@@ -32,6 +25,7 @@
"create_srcs_attr",
"create_srcs_version_attr",
)
+load(":builders.bzl", "builders")
load(
":common.bzl",
"check_native_allowed",
@@ -43,8 +37,14 @@
"filter_to_py_srcs",
"union_attrs",
)
-load(":providers.bzl", "PyCcLinkParamsProvider")
+load(":flags.bzl", "AddSrcsToRunfilesFlag", "PrecompileFlag")
+load(":py_cc_link_params_info.bzl", "PyCcLinkParamsInfo")
load(":py_internal.bzl", "py_internal")
+load(
+ ":toolchain_types.bzl",
+ "EXEC_TOOLS_TOOLCHAIN_TYPE",
+ TOOLCHAIN_TYPE = "TARGET_TOOLCHAIN_TYPE",
+)
_py_builtins = py_internal
@@ -121,7 +121,7 @@
DefaultInfo(files = default_outputs, runfiles = runfiles),
py_info,
create_instrumented_files_info(ctx),
- PyCcLinkParamsProvider(cc_info = cc_info),
+ PyCcLinkParamsInfo(cc_info = cc_info),
create_output_group_info(py_info.transitive_sources, extra_groups = {}),
]
if builtins_py_info:
diff --git a/python/private/common/py_library_macro_bazel.bzl b/python/private/py_library_macro_bazel.bzl
similarity index 100%
rename from python/private/common/py_library_macro_bazel.bzl
rename to python/private/py_library_macro_bazel.bzl
diff --git a/python/private/common/py_library_rule_bazel.bzl b/python/private/py_library_rule_bazel.bzl
similarity index 100%
rename from python/private/common/py_library_rule_bazel.bzl
rename to python/private/py_library_rule_bazel.bzl
diff --git a/python/private/common/providers.bzl b/python/private/py_runtime_info.bzl
similarity index 92%
copy from python/private/common/providers.bzl
copy to python/private/py_runtime_info.bzl
index b704ce0..359a9e7 100644
--- a/python/private/common/providers.bzl
+++ b/python/private/py_runtime_info.bzl
@@ -13,8 +13,7 @@
# limitations under the License.
"""Providers for Python rules."""
-load("@rules_cc//cc:defs.bzl", "CcInfo")
-load("//python/private:util.bzl", "define_bazel_6_provider")
+load(":util.bzl", "define_bazel_6_provider")
DEFAULT_STUB_SHEBANG = "#!/usr/bin/env python3"
@@ -299,23 +298,3 @@
""",
},
)
-
-def _PyCcLinkParamsProvider_init(cc_info):
- return {
- "cc_info": CcInfo(linking_context = cc_info.linking_context),
- }
-
-# buildifier: disable=name-conventions
-PyCcLinkParamsProvider, _unused_raw_py_cc_link_params_provider_ctor = define_bazel_6_provider(
- doc = ("Python-wrapper to forward {obj}`CcInfo.linking_context`. This is to " +
- "allow Python targets to propagate C++ linking information, but " +
- "without the Python target appearing to be a valid C++ rule dependency"),
- init = _PyCcLinkParamsProvider_init,
- fields = {
- "cc_info": """
-:type: CcInfo
-
-Linking information; it has only {obj}`CcInfo.linking_context` set.
-""",
- },
-)
diff --git a/python/private/common/py_runtime_macro.bzl b/python/private/py_runtime_macro.bzl
similarity index 100%
rename from python/private/common/py_runtime_macro.bzl
rename to python/private/py_runtime_macro.bzl
diff --git a/python/private/py_runtime_pair_rule.bzl b/python/private/py_runtime_pair_rule.bzl
index 39f15bf..b3b7a4e 100644
--- a/python/private/py_runtime_pair_rule.bzl
+++ b/python/private/py_runtime_pair_rule.bzl
@@ -16,8 +16,8 @@
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
load("//python:py_runtime_info.bzl", "PyRuntimeInfo")
-load("//python/private:reexports.bzl", "BuiltinPyRuntimeInfo")
-load("//python/private:util.bzl", "IS_BAZEL_7_OR_HIGHER")
+load(":reexports.bzl", "BuiltinPyRuntimeInfo")
+load(":util.bzl", "IS_BAZEL_7_OR_HIGHER")
def _py_runtime_pair_impl(ctx):
if ctx.attr.py2_runtime != None:
diff --git a/python/private/common/py_runtime_rule.bzl b/python/private/py_runtime_rule.bzl
similarity index 98%
rename from python/private/common/py_runtime_rule.bzl
rename to python/private/py_runtime_rule.bzl
index 088b6ea..ba9b36d 100644
--- a/python/private/common/py_runtime_rule.bzl
+++ b/python/private/py_runtime_rule.bzl
@@ -16,11 +16,11 @@
load("@bazel_skylib//lib:dicts.bzl", "dicts")
load("@bazel_skylib//lib:paths.bzl", "paths")
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
-load("//python/private:reexports.bzl", "BuiltinPyRuntimeInfo")
-load("//python/private:util.bzl", "IS_BAZEL_7_OR_HIGHER")
load(":attributes.bzl", "NATIVE_RULES_ALLOWLIST_ATTRS")
-load(":providers.bzl", "DEFAULT_BOOTSTRAP_TEMPLATE", "DEFAULT_STUB_SHEBANG", "PyRuntimeInfo")
load(":py_internal.bzl", "py_internal")
+load(":py_runtime_info.bzl", "DEFAULT_BOOTSTRAP_TEMPLATE", "DEFAULT_STUB_SHEBANG", "PyRuntimeInfo")
+load(":reexports.bzl", "BuiltinPyRuntimeInfo")
+load(":util.bzl", "IS_BAZEL_7_OR_HIGHER")
_py_builtins = py_internal
diff --git a/python/private/common/py_test_macro_bazel.bzl b/python/private/py_test_macro_bazel.bzl
similarity index 100%
rename from python/private/common/py_test_macro_bazel.bzl
rename to python/private/py_test_macro_bazel.bzl
diff --git a/python/private/common/py_test_rule_bazel.bzl b/python/private/py_test_rule_bazel.bzl
similarity index 100%
rename from python/private/common/py_test_rule_bazel.bzl
rename to python/private/py_test_rule_bazel.bzl
diff --git a/python/private/py_toolchain_suite.bzl b/python/private/py_toolchain_suite.bzl
index 3fead95..a69be37 100644
--- a/python/private/py_toolchain_suite.bzl
+++ b/python/private/py_toolchain_suite.bzl
@@ -15,7 +15,7 @@
"""Create the toolchain defs in a BUILD.bazel file."""
load("@bazel_skylib//lib:selects.bzl", "selects")
-load("//python/private:text_util.bzl", "render")
+load(":text_util.bzl", "render")
load(
":toolchain_types.bzl",
"EXEC_TOOLS_TOOLCHAIN_TYPE",
diff --git a/python/private/py_wheel.bzl b/python/private/py_wheel.bzl
index 26eb565..6d047ad 100644
--- a/python/private/py_wheel.bzl
+++ b/python/private/py_wheel.bzl
@@ -14,9 +14,9 @@
"Implementation of py_wheel rule"
-load("//python/private:stamp.bzl", "is_stamping_enabled")
load(":py_package.bzl", "py_package_lib")
load(":py_wheel_normalize_pep440.bzl", "normalize_pep440")
+load(":stamp.bzl", "is_stamping_enabled")
PyWheelInfo = provider(
doc = "Information about a wheel produced by `py_wheel`",
diff --git a/python/private/common/semantics.bzl b/python/private/semantics.bzl
similarity index 100%
rename from python/private/common/semantics.bzl
rename to python/private/semantics.bzl
diff --git a/python/private/toolchains_repo.bzl b/python/private/toolchains_repo.bzl
index 4fae987..d21e46a 100644
--- a/python/private/toolchains_repo.bzl
+++ b/python/private/toolchains_repo.bzl
@@ -30,8 +30,8 @@
"PLATFORMS",
"WINDOWS_NAME",
)
-load("//python/private:repo_utils.bzl", "REPO_DEBUG_ENV_VAR", "repo_utils")
-load("//python/private:text_util.bzl", "render")
+load(":repo_utils.bzl", "REPO_DEBUG_ENV_VAR", "repo_utils")
+load(":text_util.bzl", "render")
def get_repository_name(repository_workspace):
dummy_label = "//:_"
diff --git a/python/py_binary.bzl b/python/py_binary.bzl
index f7f68e6..3496108 100644
--- a/python/py_binary.bzl
+++ b/python/py_binary.bzl
@@ -15,9 +15,9 @@
"""Public entry point for py_binary."""
load("@rules_python_internal//:rules_python_config.bzl", "config")
+load("//python/private:py_binary_macro_bazel.bzl", _starlark_py_binary = "py_binary")
load("//python/private:register_extension_info.bzl", "register_extension_info")
load("//python/private:util.bzl", "add_migration_tag")
-load("//python/private/common:py_binary_macro_bazel.bzl", _starlark_py_binary = "py_binary")
# buildifier: disable=native-python
_py_binary_impl = _starlark_py_binary if config.enable_pystar else native.py_binary
@@ -26,9 +26,8 @@
"""Creates an executable Python program.
This is the public macro wrapping the underlying rule. Args are forwarded
- on as-is unless otherwise specified. See
- the underlying {bzl:obj}`py_binary rule<//python/private/common:py_binary_rule_bazel.bzl%py_binary>`
- for detailed attribute documentation.
+ on as-is unless otherwise specified. See the underlying {rule}`py_binary`
+ rule for detailed attribute documentation.
This macro affects the following args:
* `python_version`: cannot be `PY2`
@@ -36,8 +35,7 @@
* `tags`: May have special marker values added, if not already present.
Args:
- **attrs: Rule attributes forwarded onto the underlying
- {bzl:obj}`py_binary rule<//python/private/common:py_binary_rule_bazel.bzl%py_binary>`
+ **attrs: Rule attributes forwarded onto the underlying {rule}`py_binary`.
"""
if attrs.get("python_version") == "PY2":
fail("Python 2 is no longer supported: https://github.com/bazelbuild/rules_python/issues/886")
diff --git a/python/py_cc_link_params_info.bzl b/python/py_cc_link_params_info.bzl
index b0ad0a7..02eff71 100644
--- a/python/py_cc_link_params_info.bzl
+++ b/python/py_cc_link_params_info.bzl
@@ -1,10 +1,10 @@
"""Public entry point for PyCcLinkParamsInfo."""
load("@rules_python_internal//:rules_python_config.bzl", "config")
-load("//python/private/common:providers.bzl", _starlark_PyCcLinkParamsProvider = "PyCcLinkParamsProvider")
+load("//python/private:py_cc_link_params_info.bzl", _starlark_PyCcLinkParamsInfo = "PyCcLinkParamsInfo")
PyCcLinkParamsInfo = (
- _starlark_PyCcLinkParamsProvider if (
+ _starlark_PyCcLinkParamsInfo if (
config.enable_pystar or config.BuiltinPyCcLinkParamsProvider == None
) else config.BuiltinPyCcLinkParamsProvider
)
diff --git a/python/py_library.bzl b/python/py_library.bzl
index 3b9ddd1..4ec1da4 100644
--- a/python/py_library.bzl
+++ b/python/py_library.bzl
@@ -15,9 +15,9 @@
"""Public entry point for py_library."""
load("@rules_python_internal//:rules_python_config.bzl", "config")
+load("//python/private:py_library_macro_bazel.bzl", _starlark_py_library = "py_library")
load("//python/private:register_extension_info.bzl", "register_extension_info")
load("//python/private:util.bzl", "add_migration_tag")
-load("//python/private/common:py_library_macro_bazel.bzl", _starlark_py_library = "py_library")
# buildifier: disable=native-python
_py_library_impl = _starlark_py_library if config.enable_pystar else native.py_library
@@ -27,16 +27,14 @@
This is the public macro wrapping the underlying rule. Args are forwarded
on as-is unless otherwise specified. See
- {bzl:obj}`py_library <//python/private/common:py_library_rule_bazel.bzl%py_library>`
- for detailed attribute documentation.
+ {rule}`py_library` for detailed attribute documentation.
This macro affects the following args:
* `srcs_version`: cannot be `PY2` or `PY2ONLY`
* `tags`: May have special marker values added, if not already present.
Args:
- **attrs: Rule attributes forwarded onto
- {bzl:obj}`py_library <//python/private/common:py_library_rule_bazel.bzl%py_library>`
+ **attrs: Rule attributes forwarded onto {rule}`py_library`.
"""
if attrs.get("srcs_version") in ("PY2", "PY2ONLY"):
fail("Python 2 is no longer supported: https://github.com/bazelbuild/rules_python/issues/886")
diff --git a/python/py_runtime.bzl b/python/py_runtime.bzl
index 9c8cd00..2c44523 100644
--- a/python/py_runtime.bzl
+++ b/python/py_runtime.bzl
@@ -14,8 +14,8 @@
"""Public entry point for py_runtime."""
+load("//python/private:py_runtime_macro.bzl", _starlark_py_runtime = "py_runtime")
load("//python/private:util.bzl", "IS_BAZEL_6_OR_HIGHER", "add_migration_tag")
-load("//python/private/common:py_runtime_macro.bzl", _starlark_py_runtime = "py_runtime")
# buildifier: disable=native-python
_py_runtime_impl = _starlark_py_runtime if IS_BAZEL_6_OR_HIGHER else native.py_runtime
@@ -25,7 +25,7 @@
This is the public macro wrapping the underlying rule. Args are forwarded
on as-is unless otherwise specified. See
- {bzl:obj}`py_runtime <//python/private/common:py_runtime_rule.bzl%py_runtime>`
+ {rule}`py_runtime`
for detailed attribute documentation.
This macro affects the following args:
@@ -34,8 +34,7 @@
* `tags`: May have special marker values added, if not already present.
Args:
- **attrs: Rule attributes forwarded onto
- {bzl:obj}`py_runtime <//python/private/common:py_runtime_rule.bzl%py_runtime>`
+ **attrs: Rule attributes forwarded onto {rule}`py_runtime`.
"""
if attrs.get("python_version") == "PY2":
fail("Python 2 is no longer supported: see https://github.com/bazelbuild/rules_python/issues/886")
diff --git a/python/py_runtime_info.bzl b/python/py_runtime_info.bzl
index e88e0c0..3a31c0f 100644
--- a/python/py_runtime_info.bzl
+++ b/python/py_runtime_info.bzl
@@ -15,7 +15,7 @@
"""Public entry point for PyRuntimeInfo."""
load("@rules_python_internal//:rules_python_config.bzl", "config")
+load("//python/private:py_runtime_info.bzl", _starlark_PyRuntimeInfo = "PyRuntimeInfo")
load("//python/private:reexports.bzl", "BuiltinPyRuntimeInfo")
-load("//python/private/common:providers.bzl", _starlark_PyRuntimeInfo = "PyRuntimeInfo")
PyRuntimeInfo = _starlark_PyRuntimeInfo if config.enable_pystar else BuiltinPyRuntimeInfo
diff --git a/python/py_test.bzl b/python/py_test.bzl
index 8f93b27..2aa93ff 100644
--- a/python/py_test.bzl
+++ b/python/py_test.bzl
@@ -15,9 +15,9 @@
"""Public entry point for py_test."""
load("@rules_python_internal//:rules_python_config.bzl", "config")
+load("//python/private:py_test_macro_bazel.bzl", _starlark_py_test = "py_test")
load("//python/private:register_extension_info.bzl", "register_extension_info")
load("//python/private:util.bzl", "add_migration_tag")
-load("//python/private/common:py_test_macro_bazel.bzl", _starlark_py_test = "py_test")
# buildifier: disable=native-python
_py_test_impl = _starlark_py_test if config.enable_pystar else native.py_test
@@ -27,8 +27,7 @@
This is the public macro wrapping the underlying rule. Args are forwarded
on as-is unless otherwise specified. See
- {bzl:obj}`py_test <//python/private/common:py_test_rule_bazel.bzl%py_test>`
- for detailed attribute documentation.
+ {rule}`py_test` for detailed attribute documentation.
This macro affects the following args:
* `python_version`: cannot be `PY2`
@@ -36,8 +35,7 @@
* `tags`: May have special marker values added, if not already present.
Args:
- **attrs: Rule attributes forwarded onto
- {bzl:obj}`py_test <//python/private/common:py_test_rule_bazel.bzl%py_test>`
+ **attrs: Rule attributes forwarded onto {rule}`py_test`.
"""
if attrs.get("python_version") == "PY2":
fail("Python 2 is no longer supported: https://github.com/bazelbuild/rules_python/issues/886")