From c614ef584bb2abe660875c91cad50ca23a06ab34 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 8 Nov 2023 09:58:57 -0500 Subject: [PATCH] Fallback when SETUPTOOLS_USE_DISTUTILS=stdlib --- setuptools/command/build_clib.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setuptools/command/build_clib.py b/setuptools/command/build_clib.py index 4679cd9432..acd4d1d3ba 100644 --- a/setuptools/command/build_clib.py +++ b/setuptools/command/build_clib.py @@ -1,7 +1,12 @@ import distutils.command.build_clib as orig from distutils.errors import DistutilsSetupError from distutils import log -from distutils._modified import newer_pairwise_group + +try: + from distutils._modified import newer_pairwise_group +except ImportError: + # fallback for SETUPTOOLS_USE_DISTUTILS=stdlib + from .._distutils._modified import newer_pairwise_group class build_clib(orig.build_clib):