Skip to content

Commit 65ee123

Browse files
committed
Add system_python to protobuf_deps.bzl.
These are needed to get python headers for Python C++ and Python UPB from local system python PiperOrigin-RevId: 629786458
1 parent 58aab31 commit 65ee123

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

WORKSPACE

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ http_archive(
164164
patch_cmds = ["find google -type f -name BUILD.bazel -delete"],
165165
)
166166

167-
load("//python/dist:system_python.bzl", "system_python")
168-
169-
system_python(
170-
name = "system_python",
171-
minimum_python_version = "3.7",
172-
)
173-
174167
load("@system_python//:pip.bzl", "pip_parse")
175168

176169
pip_parse(

protobuf_deps.bzl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44
load("//python/dist:python_downloads.bzl", "python_nuget_package", "python_source_archive")
5+
load("//python/dist:system_python.bzl", "system_python")
56

67
PROTOBUF_MAVEN_ARTIFACTS = [
78
"com.google.caliper:caliper:1.0-beta-3",
@@ -102,6 +103,12 @@ def protobuf_deps():
102103
url = "https://github.com/bazelbuild/rules_python/releases/download/0.26.0/rules_python-0.26.0.tar.gz",
103104
)
104105

106+
if not native.existing_rule("system_python"):
107+
system_python(
108+
name = "system_python",
109+
minimum_python_version = "3.7",
110+
)
111+
105112
if not native.existing_rule("rules_jvm_external"):
106113
_github_archive(
107114
name = "rules_jvm_external",

0 commit comments

Comments
 (0)