From 34f963a924992d7dc0ceddce7aef4e76fe935153 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 15 Jan 2020 20:24:54 +1100 Subject: [PATCH] copy-wheels: fix index path, remove f-strings I swear this should work now ... $f is the full path to the wheel directory Additionally ... f-strings aren't available on Python 3.5, and we still build for Trusty which has Python 3.5 ... sigh :/ convert to regular strings. Change-Id: Ia03b97198f9f45914b8b99c222680d732c2cc8f8 --- roles/copy-wheels/files/wheel-index.sh | 2 +- roles/copy-wheels/files/wheel-indexer.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/roles/copy-wheels/files/wheel-index.sh b/roles/copy-wheels/files/wheel-index.sh index 5118ca41d8..1148b200a3 100755 --- a/roles/copy-wheels/files/wheel-index.sh +++ b/roles/copy-wheels/files/wheel-index.sh @@ -23,7 +23,7 @@ for f in $FILES; do # Run the indexer over this directory # NOTE(ianw) : remove temporary "--output" when working - /usr/local/bin/wheel-indexer.py --debug --output "index.html.tmp" $MIRROR_ROOT/$f + /usr/local/bin/wheel-indexer.py --debug --output "index.html.tmp" $f fi done diff --git a/roles/copy-wheels/files/wheel-indexer.py b/roles/copy-wheels/files/wheel-indexer.py index 55cae9c5ee..75ceeda8bb 100644 --- a/roles/copy-wheels/files/wheel-indexer.py +++ b/roles/copy-wheels/files/wheel-indexer.py @@ -98,13 +98,13 @@ def create_index(path, files): project = os.path.basename(path) - output = f''' + output = ''' - {project} + %s @@ -144,6 +144,7 @@ def create_index(path, files): return output +logging.debug("Building indexes from: %s" % args.toplevel) for root, dirs, files in os.walk(args.toplevel): # sanity check we are only called from leaf directories by the # driver script