summary refs log tree commit diff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludovic.courtes@inria.fr>2020-02-10 22:40:36 +0100
committerLudovic Courtès <ludo@gnu.org>2020-02-10 23:31:58 +0100
commit3cf579e9c24a98c3bac456d064270e8dc8b2086a (patch)
treea4da1f1a8390ed16391987cd9c3151f6e753e046 /gnu/packages/python-xyz.scm
parentab17297a4ddeaf897794abffabc8600334795e7e (diff)
downloadguix-3cf579e9c24a98c3bac456d064270e8dc8b2086a.tar.gz
gnu: pybind11: Install .py files.
* gnu/packages/python-xyz.scm (pybind11)[native-inputs]: Change PYTHON
to PYTHON-WRAPPER.
[arguments]: Add 'install-python' phase.
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm13
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0f16ac0ead..b47e395595 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -15407,7 +15407,7 @@ under Python 2.7.")
               (file-name (git-file-name name version))))
     (build-system cmake-build-system)
     (native-inputs
-     `(("python" ,python)
+     `(("python" ,python-wrapper)
 
        ;; The following dependencies are used for tests.
        ("python-pytest" ,python-pytest)
@@ -15419,6 +15419,17 @@ under Python 2.7.")
                             (assoc-ref %build-inputs "catch")
                             "/include/catch"))
 
+       #:phases (modify-phases %standard-phases
+                  (add-after 'install 'install-python
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (with-directory-excursion "../source"
+                          (setenv "PYBIND11_USE_CMAKE" "yes")
+                          (invoke "python" "setup.py" "install"
+                                  "--single-version-externally-managed"
+                                  "--root=/"
+                                  (string-append "--prefix=" out)))))))
+
        #:test-target "check"))
     (home-page "https://github.com/pybind/pybind11/")
     (synopsis "Seamless operability between C++11 and Python")