me
/
guix
Archived
1
0
Fork 0

gnu: fp16: Install Python files in the site directory.

* gnu/packages/maths.scm (fp16)[arguments]: New field.
master
Ludovic Courtès 2021-09-23 12:06:13 +02:00 committed by Ludovic Courtès
parent a7b6c5a127
commit 3cdb16cb50
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 23 additions and 0 deletions

View File

@ -6891,6 +6891,29 @@ when an application performs repeated divisions by the same divisor.")
"05mm4vrxsac35hjf5djif9r6rdxj9ippg97ia3p6q6b8lrp7srwv"))
(patches (search-patches "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
`(("python-wrapper" ,python-wrapper)))
(inputs