From ca3e5be50731864b0b933530b326b97407c7e2f4 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Tue, 16 Aug 2022 23:24:44 +0200 Subject: [PATCH] Grep away deprecation warning for distutils ... which will be removed in Python 3.12, and that probably won't be used on systems running the AppArmor 2.1x branches. This prevents CI failures on gitlab.com, which uses a new-enough python to show DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives For 3.0 and master, the proper fix (switching to setuptools) was done in !813. --- libraries/libapparmor/m4/ac_python_devel.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/libapparmor/m4/ac_python_devel.m4 b/libraries/libapparmor/m4/ac_python_devel.m4 index 7242f3bb5..7893ed767 100644 --- a/libraries/libapparmor/m4/ac_python_devel.m4 +++ b/libraries/libapparmor/m4/ac_python_devel.m4 @@ -64,7 +64,7 @@ variable to configure. See ``configure --help'' for reference. # Check if you have distutils, else fail # AC_MSG_CHECKING([for the distutils Python package]) - ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1 | grep -v DeprecationWarning` if test -z "$ac_distutils_result"; then AC_MSG_RESULT([yes]) else