~ruther/guix-local

78f8e9d760a9f0e30745537a011b0aaf3c1f6a63 — Nicolas Graves 4 months ago c28ec26
gnu: fp16: Switch to pyproject.

* gnu/packages/maths.scm (fp16):
[arguments]<#:modules, #:imported-modules, #:phases>: Switch to
pyproject-build-system.

Change-Id: I6ca525ea3f5704b4afce39837c21e704e2a13370
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
1 files changed, 26 insertions(+), 26 deletions(-)

M gnu/packages/maths.scm
M gnu/packages/maths.scm => gnu/packages/maths.scm +26 -26
@@ 10909,32 10909,32 @@ when an application performs repeated divisions by the same divisor.")
                                         "fp16-system-libraries.patch"))))
      (build-system cmake-build-system)
      (arguments
       `(#:imported-modules ((guix build python-build-system)
                             ,@%cmake-build-system-modules)
         #:modules (((guix build python-build-system)
                     #:select (site-packages))
                    (guix build cmake-build-system)
                    (guix build utils))
         #:phases (modify-phases %standard-phases
                    (add-after 'install 'move-python-files
                      (lambda* (#:key inputs outputs #:allow-other-keys)
                        ;; Python files get installed to $includedir (!).
                        ;; Move them to the usual Python site directory.
                        (let* ((out     (assoc-ref outputs "out"))
                               (include (string-append out "/include"))
                               (site    (site-packages inputs outputs))
                               (target  (string-append site "/fp16")))
                          (mkdir-p target)
                          (for-each (lambda (file)
                                      (rename-file file
                                                   (string-append target "/"
                                                                  (basename
                                                                   file))))
                                    (find-files include "\\.py$"))))))))
      (native-inputs
       (list python-wrapper))
      (inputs
       (list psimd googletest-1.8 googlebenchmark))
       (list
        #:imported-modules
        (append %cmake-build-system-modules
                %pyproject-build-system-modules)
        #:modules
        `(((guix build pyproject-build-system) #:select (site-packages))
          (guix build cmake-build-system)
          (guix build utils))
        #:phases
        (with-extensions (list (pyproject-guile-json))
          #~(modify-phases %standard-phases
              (add-after 'install 'move-python-files
                (lambda* (#:key inputs outputs #:allow-other-keys)
                  ;; Python files get installed to $includedir (!).
                  ;; Move them to the usual Python site directory.
                  (let* ((include (string-append #$output "/include"))
                         (site (site-packages inputs outputs))
                         (target (string-append site "/fp16")))
                    (mkdir-p target)
                    (for-each (lambda (file)
                                (rename-file file
                                             (string-append target "/"
                                                            (basename file))))
                              (find-files include "\\.py$")))))))))
      (native-inputs (list python-wrapper))
      (inputs (list psimd googletest-1.8 googlebenchmark))
      (synopsis "C++ library for half-precision floating point formats")
      (description
       "This header-only C++ library implements conversion to and from