Skip to content

Commit

Permalink
Add system_python to protobuf_deps.bzl.
Browse files Browse the repository at this point in the history
These are needed to get python headers for Python C++ and Python UPB from local system python

PiperOrigin-RevId: 629786458
  • Loading branch information
zhangskz committed May 2, 2024
1 parent 58aab31 commit 65ee123
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,6 @@ http_archive(
patch_cmds = ["find google -type f -name BUILD.bazel -delete"],
)

load("//python/dist:system_python.bzl", "system_python")

system_python(
name = "system_python",
minimum_python_version = "3.7",
)

load("@system_python//:pip.bzl", "pip_parse")

pip_parse(
Expand Down
7 changes: 7 additions & 0 deletions protobuf_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

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

if not native.existing_rule("system_python"):
system_python(
name = "system_python",
minimum_python_version = "3.7",
)

if not native.existing_rule("rules_jvm_external"):
_github_archive(
name = "rules_jvm_external",
Expand Down

0 comments on commit 65ee123

Please sign in to comment.