ModuleNotFoundError: 没有名为 'wheel.cli' 的模块
作者: C0rn3j创建于 2026年3月15日更新于 2026年4月18日
标签Priority: Loweasy
def _retag_wheel_platform(self, path, new_platform_tag, remove_old=True): """ Rename a wheel by replacing only its platform tag. Wheel filename format: {dist}-{version}(-{build})?-{Python tag}-{abi tag}-{platform tag}.whl We split from the right so project names/build tags containing '-' still work. """ p = Path(path) if p.suffix != ".whl": raise ValueError(f"Not a wheel: {path}")
parts = p.stem.rsplit("-", 3)
if len(parts) != 4:
raise ValueError(f"Unexpected wheel filename format: {p.name}")
left, py_tag, abi_tag, _old_platform_tag = parts
new_name = f"{left}-{py_tag}-{abi_tag}-{new_platform_tag}.whl"
new_path = p.with_name(new_name)
if new_path != p:
p.rename(new_path)内容来源: kivy/python-for-android