me
/
guix
Archived
1
0
Fork 0

gnu: r-torch: Do not hardcode Python version.

* gnu/packages/cran.scm (r-torch)[arguments]: Do not hardcode Python version 3.9.
master
Ricardo Wurmus 2022-09-19 21:58:29 +02:00
parent 2b39d85ac4
commit 8e321254c0
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
1 changed files with 17 additions and 13 deletions

View File

@ -24535,19 +24535,23 @@ Visualizations are also available for most of these settings.")
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'link-libraries
(lambda* (#:key inputs #:allow-other-keys)
(let ((deps (string-append #$output "/site-library/torch/deps")))
(mkdir-p deps)
(symlink
(search-input-file
inputs "/lib/python3.9/site-packages/torch/lib/libtorch.so")
(string-append deps "/libtorch.so"))
(symlink
(search-input-file
inputs "/lib/liblantern.so")
(string-append deps "/liblantern.so"))))))))
(let ((python-version (version-major+minor (package-version python))))
#~(modify-phases %standard-phases
(add-after 'install 'link-libraries
(lambda* (#:key inputs #:allow-other-keys)
(let ((deps (string-append #$output "/site-library/torch/deps"))
(site-packages (string-append "/lib/python"
#$python-version
"/site-packages")))
(mkdir-p deps)
(symlink
(search-input-file
inputs (string-append site-packages "/torch/lib/libtorch.so"))
(string-append deps "/libtorch.so"))
(symlink
(search-input-file
inputs "/lib/liblantern.so")
(string-append deps "/liblantern.so")))))))))
(inputs
(list python-pytorch-for-r-torch
liblantern))