[Buildroot] [PATCH 1/1] package/libapparmor: fix build with python 3.10
Arnout Vandecappelle
arnout at mind.be
Tue Jan 4 16:46:35 UTC 2022
On 01/01/2022 15:48, Fabrice Fontaine wrote:
> Fix the following build failure raised since bump of python3 to version
> 3.10.1 in commit 25b1fc2898d68ddf2674b14c738045875fc5a2dc:
>
> configure: error: cannot import Python module "distutils".
> Please check your Python installation. The error was:
> <string>:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
>
> Fixes:
> - http://autobuild.buildroot.org/results//f3e400cbb5b00fbd7f0cb421c993e46b64ec5ac5
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> ---
> ...deprecated-distutils-with-setuptools.patch | 244 ++++++++++++++++++
> package/libapparmor/libapparmor.mk | 2 +-
> 2 files changed, 245 insertions(+), 1 deletion(-)
> create mode 100644 package/libapparmor/0001-replace-deprecated-distutils-with-setuptools.patch
>
> diff --git a/package/libapparmor/0001-replace-deprecated-distutils-with-setuptools.patch b/package/libapparmor/0001-replace-deprecated-distutils-with-setuptools.patch
> new file mode 100644
> index 0000000000..5aed31d0b5
> --- /dev/null
> +++ b/package/libapparmor/0001-replace-deprecated-distutils-with-setuptools.patch
> @@ -0,0 +1,244 @@
> +From 21e5a721ab2abe26bb12b9da7accc39d4fff9804 Mon Sep 17 00:00:00 2001
> +From: Georgia Garcia <georgia.garcia at canonical.com>
> +Date: Wed, 10 Nov 2021 19:50:35 +0000
> +Subject: [PATCH] replace deprecated distutils with setuptools
> +
> +Adds python3 setuptools as a build dependency for libapparmor
> +
> +Fixes: https://gitlab.com/apparmor/apparmor/-/issues/202
> +MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/813
> +Signed-off-by: Georgia Garcia <georgia.garcia at canonical.com>
> +Acked-by: Christian Boltz <apparmor at cboltz.de>
> +
> +[Retrieved (and updated to remove changes on .gitlab-ci.yml and
> +README.md) from:
> +https://gitlab.com/apparmor/apparmor/-/commit/21e5a721ab2abe26bb12b9da7accc39d4fff9804]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
> +---
> + .gitignore | 3 ++
> + .gitlab-ci.yml | 2 +-
> + libraries/libapparmor/m4/ac_python_devel.m4 | 36 +++++++++----------
Sounds like this requires AUTORECONF = YES
... which was already set because it wasn't removed when the version was
bumped and the patches removed. So I updated the comment and the commit message,
and applied to master, thanks.
Regards,
Arnout
[snip]
More information about the buildroot
mailing list