[education/labplot] /: Add entitlements for code signing on macos to allow loading Python packages with different signatures.

Alexander Semke <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit ac0c696fbb92344b6fe2da57680cdfd8b688c893 by Alexander Semke.
Committed on 25/07/2026 at 18:16.
Pushed by asemke into branch 'master'.

Add entitlements for code signing on macos to allow loading Python packages with different signatures.
Required to be able to install user-specific packages (numpy,  etc.) and not being blocked by the
check for the TeamID created during the signing step.

A  +10   -0    labplot.entitlements
M  +6    -0    src/CMakeLists.txt

https://invent.kde.org/education/labplot/-/commit/ac0c696fbb92344b6fe2da57680cdfd8b688c893

diff --git a/labplot.entitlements b/labplot.entitlements
new file mode 100644
index 0000000000..4cd1769ed3
--- /dev/null
+++ b/labplot.entitlements
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<!-- Allow loading Python packages with different code signatures -->
+	<!-- Required for user-installed scientific packages (numpy, scipy, etc.) -->
+	<key>com.apple.security.cs.disable-library-validation</key>
+	<true/>
+</dict>
+</plist>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 467a1022be..e55952b3fd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1004,6 +1004,12 @@ if(APPLE) # Apple app package
     MACOSX_BUNDLE_LONG_VERSION_STRING "${labplot_VERSION}"
     MACOSX_BUNDLE_SHORT_VERSION_STRING "${labplot_VERSION}"
     MACOSX_BUNDLE_GUI_IDENTIFIER "org.kde.labplot")
+
+    # Add entitlements for code signing to allow loading Python packages with different signatures
+    # Required for user-installed scientific packages (numpy, scipy, etc.) on hardened runtime
+    set_target_properties(labplot PROPERTIES
+        XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_SOURCE_DIR}/labplot.entitlements"
+    )
 endif()
 
 ############## installation ################################
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.