python: use setuptools with python >= 3.12
[lttng-ust.git] / configure.ac
index 437d71961871ec30fe9405b05fe933817aced698..16dee8b368e5b60e5dd395fac86913ea1b581d49 100644 (file)
@@ -481,6 +481,16 @@ Cannot find a suitable python interpreter. You can override it with the PYTHON
 environment variable.
     ])
   ])
+
+  AX_COMPARE_VERSION(["$PYTHON_VERSION"], [ge], ["3.12"], [
+    AC_MSG_CHECKING([for python setuptools])
+    AS_IF(["$PYTHON" -c "import setuptools" 2>/dev/null], [
+      AC_MSG_RESULT([yes])
+    ], [
+      AC_MSG_RESULT([no])
+      AC_MSG_ERROR([Python >= 3.12 removed 'distutils', the 'setuptools' module needs to be installed for the selected interpreter.])
+    ])
+  ])
 ])
 
 # Check for asciidoc and xmlto if we enabled building the man pages.
This page took 0.02384 seconds and 4 git commands to generate.