From d576460a502ff43a3f755205cb46f5bcbf7ac9a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ey=C3=BCp=20Can=20Akman?= Date: Sat, 25 Apr 2026 23:54:46 +0300 Subject: [PATCH] Fix WHEEL Tag mismatch in transformer-engine-cu12 wheels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bdist_wheel runs with --python-tag=py3 which sets the wheel filename's tag, but the WHEEL metadata still records the build python's tag (cp310-cp310). Set the Tag to py3-none in the WHEEL file right before wheel pack so the metadata matches the filename. Fixes #2896 Signed-off-by: Eyüp Can Akman --- build_tools/wheel_utils/build_wheels.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_tools/wheel_utils/build_wheels.sh b/build_tools/wheel_utils/build_wheels.sh index e9ec854dba..ff422e9d2c 100644 --- a/build_tools/wheel_utils/build_wheels.sh +++ b/build_tools/wheel_utils/build_wheels.sh @@ -44,6 +44,8 @@ if $BUILD_COMMON ; then sed -i "s/Name: transformer-engine/Name: transformer-engine-cu${CUDA_MAJOR}/g" "transformer_engine-${VERSION}/transformer_engine-${VERSION}.dist-info/METADATA" sed -i "s/Name: transformer_engine/Name: transformer_engine_cu${CUDA_MAJOR}/g" "transformer_engine-${VERSION}/transformer_engine-${VERSION}.dist-info/METADATA" mv "${WHL_BASE}/${WHL_BASE}.dist-info" "${WHL_BASE}/transformer_engine_cu${CUDA_MAJOR}-${VERSION}.dist-info" + # Set WHEEL Tag to match the py3-none filename written by line 54. + sed -i "s/Tag: cp310-cp310/Tag: py3-none/g" "${WHL_BASE}/transformer_engine_cu${CUDA_MAJOR}-${VERSION}.dist-info/WHEEL" /opt/python/cp310-cp310/bin/wheel pack ${WHL_BASE} # Rename the wheel to make it python version agnostic.