Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building python binding with bazel on s390x #19232

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions python/dist/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,25 @@ config_setting(
},
)

config_setting(
name = "linux_s390x_release",
flag_values = {
"//toolchain:release": "True",
},
values = {"cpu": "linux-s390x"},
)

config_setting(
name = "linux_s390x_local",
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 @@ -328,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": "linux_s390x",
":linux_s390x_release": "manylinux2014_s390x",
":osx_universal2": "macosx_10_9_universal2",
":osx_aarch64": "macosx_11_0_arm64",
":windows_x86_32": "win32",
Expand Down Expand Up @@ -458,6 +479,7 @@ py_dist(
"win64": "310",
"linux-x86_64": "38",
"linux-aarch_64": "38",
"linux-s390x": "38",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gongsu832 Unfortunately I haven't been able to figure out any way to merge this change without breaking our CI, unless I delete this line. Otherwise our build fails because we don't have an appropriate toolchain installed for s390x. Is is still useful to merge the PR without this line? I guess that might still allow you to write your own py_dist() target in a separate repo.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @acozzette thank you very much for trying to merge this PR. Yes it would still be very helpful for us if you could merge without that line.

"osx-universal2": "38",
},
# LINT.ThenChange(:python_tag)
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
Loading