mongodb: fix build with python 3.12

The moduleconfig.py build script uses the 'imp' module which
is deprecated in favor of 'importlib' in python 3.12. This fixes
the build issue by replacing the affected portion of the code
and the package now builds fine on hosts with python 3.12.

Signed-off-by: Awais Belal <awais.belal@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Awais Belal
2025-03-07 14:32:54 +05:00
committed by Armin Kuster
parent 73e6789fdf
commit edd1a1e284
2 changed files with 58 additions and 2 deletions
@@ -36,6 +36,7 @@ SRC_URI = "git://github.com/mongodb/mongo.git;branch=v4.4;protocol=https \
file://0001-apply-msvc-workaround-for-clang-16.patch \
file://0001-Fix-type-mismatch-on-32bit-arches.patch \
file://0001-Fix-build-on-32bit.patch \
file://0001-moduleconfig.py-python-3.12-compatibility.patch \
"
SRC_URI:append:libc-musl ="\
file://0001-Mark-one-of-strerror_r-implementation-glibc-specific.patch \
@@ -145,5 +146,3 @@ SYSTEMD_SERVICE:${PN} = "mongod.service"
FILES:${PN} += "${nonarch_libdir}/tmpfiles.d"
RDEPENDS:${PN} += "tzdata-core"
SKIP_RECIPE[mongodb] ?= "Needs porting to python 3.12"