From 4333f6a52ebcd17ccdcc4d149d75d51edaf6de3a Mon Sep 17 00:00:00 2001
From: AlQuemist <alquemist@Lyriks>
Date: Thu, 15 Jun 2023 16:44:32 +0200
Subject: [PATCH] PyDependences: add 'auditwheel' as a required Python package
 for Linux (PEP 599)

---
 cmake/multipython/PyDependences.cmake | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/cmake/multipython/PyDependences.cmake b/cmake/multipython/PyDependences.cmake
index 8c678c80057..5c217c1a86f 100644
--- a/cmake/multipython/PyDependences.cmake
+++ b/cmake/multipython/PyDependences.cmake
@@ -21,7 +21,13 @@ message(STATUS "Python package destination directory: ${destination_pypackage}")
 
 # check presence of some Python modules
 message(STATUS "Searching required Python packages...")
-foreach(pkg pip numpy matplotlib)
+set(py_packages "pip;numpy;matplotlib")
+if(LINUX)
+    # on Linux, `auditwheel` is needed to produce 'manylinux' wheels repair (PEP 599)
+    list(APPEND py_packages "auditwheel")
+endif()
+
+foreach(pkg ${py_packages})
     message(STATUS "Python package ${pkg}")
     execute_process(
         COMMAND ${Python3_EXECUTABLE} -c "import ${pkg}"
-- 
GitLab