From d5c7bfe080aa686ec84224b04d834201ac23fa6f Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Thu, 10 Oct 2024 10:47:08 -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 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ceddf40..7c3a590 100644 --- a/setup.py +++ b/setup.py @@ -9,9 +9,15 @@ import subprocess from warnings import warn import packaging.version -from wheel.bdist_wheel import bdist_wheel import sysconfig +try: + # First available on setuptools 70.1 from January 2024 + # https://setuptools.pypa.io/en/stable/history.html#v70-1-0 + from setuptools.command.bdist_wheel import bdist_wheel +except ImportError: + from wheel.bdist_wheel import bdist_wheel + LIBERFADIR = os.path.join('liberfa', 'erfa') ERFA_SRC = os.path.join(LIBERFADIR, 'src')