Skip to content

Commit

Permalink
Save TF wheel version and suffix in repository rule.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 712590503
  • Loading branch information
tensorflower-gardener authored and copybara-github committed Jan 11, 2025
1 parent d07ad02 commit a6673fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@

# Default build options. These are applied first and unconditionally.

# These are used to generate the ML wheel version string.
# See the explanation in the file comment of
# @tsl//third_party/py/python_wheel_version_suffix.bzl.
# The generated version suffix is used in
# third_party/tensorflow/core/public/version.h.tpl and
# third_party/tensorflow/tools/pip_package/setup.oss.py.tpl
build --repo_env=ML_WHEEL_TYPE="snapshot"
build --repo_env=ML_WHEEL_BUILD_DATE=""
build --repo_env=ML_WHEEL_VERSION_SUFFIX=""

# For projects which use TensorFlow as part of a Bazel build process, putting
# nothing in a bazelrc will default to a monolithic build. The following line
# opts in to modular op registration support by default.
Expand Down
2 changes: 1 addition & 1 deletion third_party/py/manylinux_compliance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def verify_manylinux_compliance(
Raises:
RuntimeError: if the wheel is not manyLinux compliant.
"""
regex = 'following platform tag: "{}"'.format(compliance_tag)
regex = 'following platform tag:\s+"{}"'.format(compliance_tag)
if not re.search(regex, auditwheel_log):
raise RuntimeError(
("The wheel is not compliant with the tag {tag}.\n{result}").format(
Expand Down

0 comments on commit a6673fd

Please sign in to comment.