-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace manyLinux compliance check action in TF wheel build rule with…
… macros for Linux platforms. Example of usage: ``` load( "@tsl//:third_party/py/py_manylinux_compliance_test.bzl", "verify_manylinux_compliance_test", ) verify_manylinux_compliance_test( name = "manylinux_compliance_test", aarch64_compliance_tag = "manylinux_2_17_aarch64", test_tags = [ "mac_excluded", "windows_excluded", ], wheel = ":wheel", x86_64_compliance_tag = "manylinux_2_17_x86_64", ) ``` The test target is executed only when specified in Bazel command line. The test passes if `auditwheel show` results have the compliance tag value (depends on the machine type). The test fails otherwise and prints the `auditwheel show` results. PiperOrigin-RevId: 708024471
- Loading branch information
1 parent
4fc84bd
commit 0d9917d
Showing
5 changed files
with
61 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
""" Macros for manylinux compliance verification test. """ | ||
|
||
load("@rules_python//python:py_test.bzl", "py_test") | ||
|
||
def verify_manylinux_compliance_test( | ||
name, | ||
wheel, | ||
aarch64_compliance_tag, | ||
x86_64_compliance_tag, | ||
test_tags = []): | ||
py_test( | ||
name = name, | ||
srcs = [Label("//third_party/py:manylinux_compliance_test")], | ||
data = [ | ||
wheel, | ||
], | ||
deps = ["@pypi_auditwheel//:pkg"], | ||
args = [ | ||
"--wheel-path=$(location {})".format(wheel), | ||
"--aarch64-compliance-tag={}".format(aarch64_compliance_tag), | ||
"--x86_64-compliance-tag={}".format(x86_64_compliance_tag), | ||
], | ||
main = "manylinux_compliance_test.py", | ||
tags = ["manual"] + test_tags, | ||
) |