[Feature]distinguish whl version (#7204)

* [Feature]whl version

* [Feature]whl version,set root_is_pure = false

* [Feature]code style
This commit is contained in:
ChowMingSing
2026-04-07 20:38:27 +08:00
committed by GitHub
parent 9d4fd19c3f
commit d693d4be14
+8 -6
View File
@@ -23,6 +23,7 @@ from functools import lru_cache
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 @@ PLAT_TO_CMAKE = {
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):