From e50fb3f561f1bfcd0a5fb457c69d50da64c789f8 Mon Sep 17 00:00:00 2001 From: Michael Case Date: Wed, 21 Mar 2018 10:26:49 -0700 Subject: [PATCH] Fix zipfile path for MacOS builds. For some reason, the zipfile module on Macs appears to work differently and complains about the whl file we are trying to extract not being found. PiperOrigin-RevId: 189928007 --- tensorflow/tools/ci_build/copy_binary.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorflow/tools/ci_build/copy_binary.py b/tensorflow/tools/ci_build/copy_binary.py index b5a282b..420d390 100755 --- a/tensorflow/tools/ci_build/copy_binary.py +++ b/tensorflow/tools/ci_build/copy_binary.py @@ -60,7 +60,7 @@ def copy_binary(directory, origin_tag, new_tag, version, gpu=False): package = "tf_nightly" origin_binary = BINARY_STRING_TEMPLATE % (package, version, origin_tag) new_binary = BINARY_STRING_TEMPLATE % (package, version, new_tag) - zip_ref = zipfile.ZipFile(directory + origin_binary, "r") + zip_ref = zipfile.ZipFile(os.path.join(directory, origin_binary), "r") try: tmpdir = tempfile.mkdtemp() @@ -115,6 +115,7 @@ def main(): args = parser.parse_args() # Argument checking + args.filename = os.path.abspath(args.filename) check_existence(args.filename) regex_groups = re.search(TF_NIGHTLY_REGEX, args.filename) directory = regex_groups.group(1) -- 2.7.4