summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorDavid Elsing <david.elsing@posteo.net>2024-08-04 22:15:59 +0000
committerLudovic Courtès <ludo@gnu.org>2024-09-06 11:46:25 +0200
commita9e4ce6a58dd57dcb1f3f4943d379df66716e145 (patch)
tree44576e8a6cde8780175a99cd6458154610676800 /gnu/packages
parentb44b2e346c1274eff3392ebfbf0aa3b6595e156c (diff)
gnu: python-torchvision: Update to 0.19.0.
* gnu/packages/machine-learning.scm (python-torchvision): Update to 0.19.0. [arguments]: Add 'setenv' phase for finding libjpeg-turbo. [inputs]: Add ffmpeg.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/machine-learning.scm21
1 files changed, 16 insertions, 5 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 41f1271ed59..8b22faa2b5d 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -5330,7 +5330,7 @@ implementations and an easy-to-use API to create custom metrics. It offers:
(define-public python-torchvision
(package
(name "python-torchvision")
- (version "0.17.1")
+ (version "0.19.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -5340,7 +5340,7 @@ implementations and an easy-to-use API to create custom metrics. It offers:
(file-name (git-file-name name version))
(sha256
(base32
- "094jz0ryzh0yjxf687r61r482fdh3bax8ix2csghraps0z1sns1b"))
+ "15zyq2k4x9yapx7qfghhslznz1mwybhf086pirsr98c4l891sp1r"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -5348,10 +5348,21 @@ implementations and an easy-to-use API to create custom metrics. It offers:
(delete-file-recursively "ios")))))
(build-system pyproject-build-system)
(arguments
- (list #:tests? #false)) ;the test suite is expensive and there is no easy
- ;way to subset it.
+ (list
+ ;; The test suite is expensive and there is no easy way to subset it.
+ #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'setenv
+ (lambda _
+ (let ((jpegdir #$(this-package-input "libjpeg-turbo")))
+ (setenv "TORCHVISION_INCLUDE"
+ (string-append jpegdir "/include/"))
+ (setenv "TORCHVISION_LIBRARY"
+ (string-append jpegdir "/lib/"))))))))
(inputs
- (list libpng
+ (list ffmpeg
+ libpng
libjpeg-turbo))
(propagated-inputs
(list python-numpy