aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/ci_build/copy_binary.py
diff options
context:
space:
mode:
authorGravatar Michael Case <mikecase@google.com>2018-03-21 10:26:49 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-21 10:29:14 -0700
commite50fb3f561f1bfcd0a5fb457c69d50da64c789f8 (patch)
treeb7c0bab417cccfe7c9aaba340c5a1f95c78364a1 /tensorflow/tools/ci_build/copy_binary.py
parentd854706bb3ccbcd3808ed5d89cb4b094634614ef (diff)
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
Diffstat (limited to 'tensorflow/tools/ci_build/copy_binary.py')
-rwxr-xr-xtensorflow/tools/ci_build/copy_binary.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/tools/ci_build/copy_binary.py b/tensorflow/tools/ci_build/copy_binary.py
index b5a282b64a..420d390d2b 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)