diff --git a/setup.py b/setup.py index 0428a39117..e6b9652e17 100644 --- a/setup.py +++ b/setup.py @@ -997,7 +997,10 @@ class my_build_shared_clib(my_build_clib): def do_build_libraries(self, libraries): from distutils.errors import DistutilsSetupError from distutils import log - from setuptools.dep_util import newer_pairwise_group + try: + from setuptools import newer_pairwise_group + except ImportError: + from setuptools.dep_util import newer_pairwise_group from distutils.ccompiler import CCompiler builder = self.distribution.get_command_obj('build_ext')