[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/211: gnu: r-torch: Do not hardcode Python version.
From: |
guix-commits |
Subject: |
07/211: gnu: r-torch: Do not hardcode Python version. |
Date: |
Tue, 20 Sep 2022 06:23:35 -0400 (EDT) |
rekado pushed a commit to branch wip-r
in repository guix.
commit d5f148503813548236416bb132f63ad2524c5940
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Mon Sep 19 21:58:29 2022 +0200
gnu: r-torch: Do not hardcode Python version.
* gnu/packages/cran.scm (r-torch)[arguments]: Do not hardcode Python
version 3.9.
---
gnu/packages/cran.scm | 30 +++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index af672c0c5e..46e6d8a380 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -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))
- 28/211: gnu: r-callr: Update to 3.7.2., (continued)
- 28/211: gnu: r-callr: Update to 3.7.2., guix-commits, 2022/09/20
- 58/211: gnu: r-rbibutils: Update to 2.2.9., guix-commits, 2022/09/20
- 78/211: gnu: r-tweedie: Update to 2.3.5., guix-commits, 2022/09/20
- 84/211: gnu: r-tidytree: Update to 0.4.0., guix-commits, 2022/09/20
- 85/211: gnu: r-sparsesvd: Update to 0.2-1., guix-commits, 2022/09/20
- 98/211: gnu: r-spdep: Update to 1.2-5., guix-commits, 2022/09/20
- 101/211: gnu: r-ggforce: Update to 0.3.4., guix-commits, 2022/09/20
- 102/211: gnu: r-gbm: Update to 2.1.8.1., guix-commits, 2022/09/20
- 105/211: gnu: r-ggtext: Update to 0.1.2., guix-commits, 2022/09/20
- 01/211: gnu: Add r-confintr., guix-commits, 2022/09/20
- 07/211: gnu: r-torch: Do not hardcode Python version.,
guix-commits <=
- 64/211: gnu: r-labelled: Update to 2.10.0., guix-commits, 2022/09/20
- 31/211: gnu: r-shinyfiles: Update to 0.9.3., guix-commits, 2022/09/20
- 57/211: gnu: r-hdf5r: Update to 1.3.6., guix-commits, 2022/09/20
- 42/211: gnu: r-cli: Update to 3.4.0., guix-commits, 2022/09/20
- 79/211: gnu: r-chk: Update to 0.8.1., guix-commits, 2022/09/20
- 110/211: gnu: r-sctransform: Update to 0.3.4., guix-commits, 2022/09/20
- 118/211: gnu: r-terra: Update to 1.6-17., guix-commits, 2022/09/20
- 119/211: gnu: r-tidygraph: Update to 1.2.2., guix-commits, 2022/09/20
- 120/211: gnu: r-parameters: Update to 0.18.2., guix-commits, 2022/09/20
- 121/211: gnu: r-lifecycle: Update to 1.0.2., guix-commits, 2022/09/20