From d80f99b6fa201c4a0056152b1cc8774a7457c008 Mon Sep 17 00:00:00 2001 From: ChowMingSing <610208940@qq.com> Date: Tue, 7 Apr 2026 20:38:27 +0800 Subject: [PATCH] [Feature]distinguish whl version (#7204) * [Feature]whl version * [Feature]whl version,set root_is_pure = false * [Feature]code style --- setup.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index d0edf2c907b..4c4e24f950e 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,7 @@ from pathlib import Path import paddle +from packaging import tags from setuptools import Extension, find_packages, setup from setuptools.command.build_ext import build_ext from setuptools.command.install import install @@ -42,16 +43,17 @@ class CustomBdistWheel(bdist_wheel): - """Custom wheel builder for pure Python packages.""" + """Custom wheel builder.""" def finalize_options(self): - """Configure wheel as pure Python and platform-independent.""" + """Configure wheel as {python tag}-{abi tag}-{platform tag}.""" super().finalize_options() - self.root_is_pure = True - self.python_tag = "py3" - self.abi_tag = "none" + tag = next(tags.sys_tags()) + self.root_is_pure = False + self.python_tag = tag.interpreter + self.abi_tag = tag.abi self.plat_name_supplied = True - self.plat_name = "any" + self.plat_name = tag.platform class CMakeExtension(Extension):