gnu: r-torch: Do not hardcode Python version.
* gnu/packages/cran.scm (r-torch)[arguments]: Do not hardcode Python version 3.9.master
parent
2b39d85ac4
commit
8e321254c0
|
@ -24535,19 +24535,23 @@ Visualizations are also available for most of these settings.")
|
|||
(arguments
|
||||
(list
|
||||
#:phases
|
||||
(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")))
|
||||
(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 "/lib/python3.9/site-packages/torch/lib/libtorch.so")
|
||||
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"))))))))
|
||||
(string-append deps "/liblantern.so")))))))))
|
||||
(inputs
|
||||
(list python-pytorch-for-r-torch
|
||||
liblantern))
|
||||
|
|
Reference in New Issue