guix_mirror_bot pushed a commit to branch python-team
in repository guix.

commit 3d338ba2cbccac46883b1c1c08b28236c1f83ac8
Author: Danny Milosavljevic <[email protected]>
AuthorDate: Tue Mar 3 23:41:23 2026 +0100

    gnu: pybind11: Install cmake files.
    
    * gnu/packages/python-xyz.scm 
(pybind11)[arguments]<#:phases>{install-cmake-files}:
    New phase.
    
    Change-Id: Ia70e835d1949e2c2fc9135bcda578cb081711c9f
---
 gnu/packages/python-xyz.scm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 08adac5aa0..c0058f1394 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26738,7 +26738,21 @@ binding is created using the standard @code{ctypes} 
library.")
     (build-system pyproject-build-system)
     (arguments
      (list
-      #:tests? #f))  ; Tests require building C++ test modules
+      #:tests? #f  ; Tests require building C++ test modules
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'install-cmake-files
+            ;; scikit-build-core installs cmake config files inside
+            ;; site-packages/pybind11/share/cmake/, but cmake's find_package()
+            ;; expects them under share/cmake/.
+            (lambda _
+              (let ((site (string-append #$output "/lib/python"
+                                         #$(version-major+minor
+                                            (package-version python))
+                                         "/site-packages")))
+                (with-directory-excursion (string-append site "/pybind11")
+                  (copy-recursively "include" (string-append #$output 
"/include"))
+                  (copy-recursively "share" (string-append #$output 
"/share")))))))))
     (native-inputs
      (list python-scikit-build-core-bootstrap
            python-wrapper))

Reply via email to