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):