From 38eb0feb2c5168b88cc6536a75f453bd290a70c2 Mon Sep 17 00:00:00 2001
From: AlQuemist <alquemist@Lyriks>
Date: Fri, 13 Oct 2023 18:42:33 +0200
Subject: [PATCH] mk_pypack_macos.zsh: fix regexp to extract the Python library

---
 devtools/deploy/mac/mk_pypack_macos.zsh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devtools/deploy/mac/mk_pypack_macos.zsh.in b/devtools/deploy/mac/mk_pypack_macos.zsh.in
index 11f2a010f39..990aa24efd4 100644
--- a/devtools/deploy/mac/mk_pypack_macos.zsh.in
+++ b/devtools/deploy/mac/mk_pypack_macos.zsh.in
@@ -164,7 +164,7 @@ function get_python_dependence
     # regexp to correct the Python dependence; eg.:
     # '/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/Python' => 'libpython3.9.dylib'
     # '/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/libpython3.9.dylib' => 'libpython3.9.dylib'
-    pylib_re='s;.*[pP]ython.+[Vv]ersions/([0-9.]+).+(Python|libpython).*;libpython\1.dylib;'
+    pylib_re='s;.+/(Python|libpython)([0-9.]+)\.dylib;libpython\2.dylib;'
     # obtain the dependencies
     pydeps0=$(dylib_deps "$1")
     pydepends_fullpath=$(echo "$pydeps0" | sed -nE $py_fmwk_re)
-- 
GitLab