MINGW-packages/mingw-w64-python/0078-correctly-find-native-python.patch
2025-10-10 14:31:04 +02:00

28 lines
901 B
Diff

From 05873e7473bd34485769d73bacd07e74f42b4812 Mon Sep 17 00:00:00 2001
From: Naveen M K <naveen521kk@gmail.com>
Date: Sun, 18 Jun 2023 14:29:50 +0530
Subject: [PATCH 078/N] correctly find native python
it's required for regen-modules
---
configure.ac | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 01344fe..56bd3c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,9 +204,11 @@ AC_SUBST([FREEZE_MODULE])
AC_SUBST([FREEZE_MODULE_DEPS])
AC_SUBST([PYTHON_FOR_BUILD_DEPS])
+NATIVE_PYTHON_SEARCH_PATH_MINGW=`echo $host | grep -Eq 'mingw*' && echo "$MINGW_PREFIX/bin" || echo $PATH`
AC_CHECK_PROGS([PYTHON_FOR_REGEN],
[python$PACKAGE_VERSION python3.12 python3.11 python3.10 python3 python],
- [python3])
+ [python3],
+ [$NATIVE_PYTHON_SEARCH_PATH_MINGW])
AC_SUBST([PYTHON_FOR_REGEN])
AC_MSG_CHECKING([Python for regen version])