From 986f414225c5f5e9a0d2ce43ae46b6f4a42c1cfd Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Thu, 10 Oct 2024 11:30:13 -0400 Subject: [PATCH] BLD: prefer to use bdist_wheel from setuptools rather than wheel Due to upcoming changes to setuptools (https://github.com/pypa/setuptools/pull/4647) using bdist_wheel from wheel will fail. --- setup.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 14ddc3f25f..498f4ea220 100644 --- a/setup.py +++ b/setup.py @@ -20,9 +20,13 @@ import setuptools try: - import wheel.bdist_wheel + import setuptools.command.bdist_wheel as wheel except ImportError: - wheel = None + try: + import wheel.bdist_wheel as wheel + except ImportError: + wheel = None + kwargs = {} @@ -58,7 +62,7 @@ if wheel is not None: # From https://github.com/joerick/python-abi3-package-sample/blob/main/setup.py - class bdist_wheel_abi3(wheel.bdist_wheel.bdist_wheel): + class bdist_wheel_abi3(wheel.bdist_wheel): def get_tag(self): python, abi, plat = super().get_tag()