From 8092a08a9ab7fdd20e77a5286c228352a25d52b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Kiss=20Koll=C3=A1r?= Date: Mon, 2 Oct 2023 21:37:53 +0100 Subject: [PATCH 1/2] Convert repair error string to f-string --- src/auditwheel/main_repair.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/auditwheel/main_repair.py b/src/auditwheel/main_repair.py index b1d9f878..81286e8a 100644 --- a/src/auditwheel/main_repair.py +++ b/src/auditwheel/main_repair.py @@ -134,9 +134,9 @@ def execute(args, p): if reqd_tag > get_priority_by_name(wheel_abi.sym_tag): msg = ( - 'cannot repair "%s" to "%s" ABI because of the presence ' - "of too-recent versioned symbols. You'll need to compile " - "the wheel on an older toolchain." % (wheel_file, args.PLAT) + f'cannot repair "{wheel_file}" to "{args.PLAT}" ABI because of ' + "the presence of too-recent versioned symbols. You'll need " + "to compile the wheel on an older toolchain. " ) p.error(msg) From a9e144932f740eaae9deb966f64e9943357ec941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Kiss=20Koll=C3=A1r?= Date: Mon, 2 Oct 2023 21:45:41 +0100 Subject: [PATCH 2/2] Display current wheel tag in repair error To provide a bit more information when the wheel isn't repairable due to too new symbols, print the current wheel tag, if it is compliant with any. --- src/auditwheel/main_repair.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/auditwheel/main_repair.py b/src/auditwheel/main_repair.py index 81286e8a..84abf778 100644 --- a/src/auditwheel/main_repair.py +++ b/src/auditwheel/main_repair.py @@ -138,6 +138,11 @@ def execute(args, p): "the presence of too-recent versioned symbols. You'll need " "to compile the wheel on an older toolchain. " ) + if reqd_tag != 0: + msg += ( + "At the moment this wheel is compliant with the " + f'"{wheel_abi.sym_tag}" platform tag.' + ) p.error(msg) if reqd_tag > get_priority_by_name(wheel_abi.ucs_tag):