From e082348c4992e1850ba5e2bd02bbd7bd0c4c4b82 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Fri, 24 Jun 2022 23:26:45 -0400 Subject: [PATCH] Import setuptools before distutils Setuptools wants to be imported before distutils, and prints a warning if it is not. Starting with a recent version (>57.2, <=61.2), not following this rule causes catkin's own monkey patching to fail. This commit reverses the import order to fix the warning and patching issue. --- cmake/interrogate_setup_dot_py.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/interrogate_setup_dot_py.py b/cmake/interrogate_setup_dot_py.py index 5e25fbf8a..e8d704512 100644 --- a/cmake/interrogate_setup_dot_py.py +++ b/cmake/interrogate_setup_dot_py.py @@ -40,14 +40,14 @@ setup_modules = [] try: - import distutils.core - setup_modules.append(distutils.core) + import setuptools + setup_modules.append(setuptools) except ImportError: pass try: - import setuptools - setup_modules.append(setuptools) + import distutils.core + setup_modules.append(distutils.core) except ImportError: pass