aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2023-03-18 07:51:37 +0100
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2023-04-02 11:19:21 +0200
commit8fdf5535c4b2d955ea38c7f9724d5c85ee56e617 (patch)
treec389dabbdb76249a0ada53dc05e84eaaa7c6c783 /gnu
parentac30e9766416d0df76cdd4bf8f419a32d870f6fe (diff)
downloadguix-8fdf5535c4b2d955ea38c7f9724d5c85ee56e617.tar.gz
guix-8fdf5535c4b2d955ea38c7f9724d5c85ee56e617.zip
gnu: python-imageio: Update to 2.26.0.
* gnu/packages/python-xyz.scm (python-imageio): Update to 2.26.0. [build-system]: Use pyproject-build-system. [arguments]: Use G-Expressions. <#:tests?>: Drop argument. <#:test-flags>: New argument. <#:phases>: Drop replacement for ‘check’. Add ‘fix-source’ and ‘fix-failing-tests’. [inputs]: Add freeimage. [propagated-inputs]: Add python-imageio-ffmpeg.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/python-xyz.scm44
1 files changed, 28 insertions, 16 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5a845340f6..69dadd83ce 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8197,29 +8197,41 @@ from FFMPEG, reliably terminating the process when done.")
(define-public python-imageio
(package
(name "python-imageio")
- (version "2.8.0")
+ (version "2.26.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "imageio" version))
(sha256
(base32
- "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
- (build-system python-build-system)
+ "0dgddhi5dlpry5j4d3256v09pcziyj3ii47yx0zi68xprm11d7qn"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:tests? #f ; many tests require online data
- #:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key outputs inputs tests? #:allow-other-keys)
- (if tests?
- (begin
- ;; Make installed package available for running the tests.
- (add-installed-pythonpath inputs outputs)
- (invoke "pytest" "-vv"))
- #t))))))
- (propagated-inputs
- (list python-numpy python-pillow python-psutil))
+ (list
+ #:test-flags #~(list "-m" "not needs_internet")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "imageio/plugins/_freeimage.py"
+ (("os\\.getenv\\(\"IMAGEIO_FREEIMAGE_LIB\".*\\)" all)
+ (string-append
+ "(" all " or \""
+ (search-input-file inputs "lib/libfreeimage.so")
+ "\")")))
+ (substitute* "imageio/core/util.py"
+ (("\"/var/tmp\"")
+ "os.getenv(\"TMPDIR\", \"/tmp\")"))))
+ (add-after 'unpack 'fix-failing-tests
+ (lambda _
+ (substitute* "tests/test_core.py"
+ (("(core\\.load_lib)\\((\\[gllib\\], \\[\\])\\)"
+ all fun args)
+ (string-append "raises(ValueError, " fun ", " args ")")))
+ (delete-file "tests/test_freeimage.py"))))))
+ (inputs (list freeimage))
+ (propagated-inputs
+ (list python-imageio-ffmpeg python-numpy python-pillow python-psutil))
(native-inputs
(list python-pytest))
(home-page "https://imageio.github.io/")