File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323from pathlib import Path
2424
2525import paddle
26+ from packaging import tags
2627from setuptools import Extension , find_packages , setup
2728from setuptools .command .build_ext import build_ext
2829from setuptools .command .install import install
4243
4344
4445class CustomBdistWheel (bdist_wheel ):
45- """Custom wheel builder for pure Python packages ."""
46+ """Custom wheel builder."""
4647
4748 def finalize_options (self ):
48- """Configure wheel as pure Python and platform-independent ."""
49+ """Configure wheel as {python tag}-{abi tag}-{platform tag} ."""
4950 super ().finalize_options ()
50- self .root_is_pure = True
51- self .python_tag = "py3"
52- self .abi_tag = "none"
51+ tag = next (tags .sys_tags ())
52+ self .root_is_pure = False
53+ self .python_tag = tag .interpreter
54+ self .abi_tag = tag .abi
5355 self .plat_name_supplied = True
54- self .plat_name = "any"
56+ self .plat_name = tag . platform
5557
5658
5759class CMakeExtension (Extension ):
You can’t perform that action at this time.
0 commit comments