Skip to content

Commit

Permalink
Building python binding with bazel on s390x (#19232)
Browse files Browse the repository at this point in the history
Changes needed for building python binding with bazel on s390x.

Closes #19232

COPYBARA_INTEGRATE_REVIEW=#19232 from gongsu832:python_bazel_s390x 7ed0c48
PiperOrigin-RevId: 699209740
  • Loading branch information
gongsu832 authored and copybara-github committed Nov 22, 2024
1 parent aa9868e commit 15e7d71
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions python/dist/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,27 @@ config_setting(
},
)

# s390x support is community-maintained and not officially supported. We do not
# publish s390x wheels.
config_setting(
name = "linux_s390x_release_unused",
flag_values = {
"//toolchain:release": "True",
},
values = {"cpu": "linux-s390x"},
)

config_setting(
name = "linux_s390x_local_unused",
constraint_values = [
"@platforms//os:linux",
"@platforms//cpu:s390x",
],
flag_values = {
"//toolchain:release": "False",
},
)

config_setting(
name = "osx_x86_64_release",
flag_values = {
Expand Down Expand Up @@ -326,6 +347,8 @@ py_wheel(
":linux_x86_64_release": "manylinux2014_x86_64",
":linux_aarch64_local": "linux_aarch64",
":linux_aarch64_release": "manylinux2014_aarch64",
":linux_s390x_local_unused": "linux_s390x",
":linux_s390x_release_unused": "manylinux2014_s390x",
":osx_universal2": "macosx_10_9_universal2",
":osx_aarch64": "macosx_11_0_arm64",
":windows_x86_32": "win32",
Expand Down
1 change: 1 addition & 0 deletions python/dist/dist.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def _get_suffix(limited_api, python_version, cpu):
"linux-aarch_64": "aarch64-linux-gnu",
"linux-x86_64": "x86_64-linux-gnu",
"k8": "x86_64-linux-gnu",
"s390x": "s390x-linux-gnu",
}

return ".cpython-{}-{}.{}".format(
Expand Down

0 comments on commit 15e7d71

Please sign in to comment.