Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -42,16 +43,17 @@


class CustomBdistWheel(bdist_wheel):
"""Custom wheel builder for pure Python packages."""
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 建议 类文档注释仍然描述为"Custom wheel builder for pure Python packages",但实际变更后生成的是平台特定的 wheel(非纯 Python)。

建议更新文档注释以与实际行为一致:

class CustomBdistWheel(bdist_wheel):
    """Custom wheel builder for platform-specific 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):
Expand Down
Loading