summaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm106
1 files changed, 98 insertions, 8 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5a4220541e..0e12f75357 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -6082,17 +6082,99 @@ a general image processing tool.")
(description "This package is a fork of Pillow which adds support for SIMD
parallelism.")))
+(define-public python-imagecodecs
+ (package
+ (name "python-imagecodecs")
+ (version "2021.3.31")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "imagecodecs" version))
+ (sha256
+ (base32
+ "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Unbundle 3rd party modules.
+ (delete-file-recursively "3rdparty")
+ ;; Delete pre-generated Cython files.
+ (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
+ #t))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f ; Tests are disabled, because dependencies are missing.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'create-configuration
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; By default everything is enabled. We can selectively disable
+ ;; extensions (and thus dependencies) by deleting them from the
+ ;; EXTENSIONS dictionary. This is upstream’s preferred way.
+ (call-with-output-file "imagecodecs_distributor_setup.py"
+ (lambda (port)
+ (format port "\
+def customize_build(EXTENSIONS, OPTIONS):
+ del EXTENSIONS['aec']
+ del EXTENSIONS['avif']
+ del EXTENSIONS['bitshuffle']
+ del EXTENSIONS['deflate']
+ del EXTENSIONS['jpeg2k']
+ del EXTENSIONS['jpeg12']
+ del EXTENSIONS['jpegls']
+ del EXTENSIONS['jpegxl']
+ del EXTENSIONS['jpegxr']
+ del EXTENSIONS['lerc']
+ del EXTENSIONS['ljpeg']
+ del EXTENSIONS['lzf']
+ del EXTENSIONS['zfp']
+ del EXTENSIONS['zopfli']
+ OPTIONS['cythonize']
+")))
+ #t)))))
+ (inputs
+ `(("c-blosc" ,c-blosc)
+ ("giflib" ,giflib)
+ ("google-brotli" ,google-brotli)
+ ("libjpeg-turbo" ,libjpeg-turbo)
+ ("libpng" ,libpng)
+ ("libtiff" ,libtiff)
+ ("libwebp" ,libwebp)
+ ("lz4" ,lz4)
+ ("snappy" ,snappy)
+ ("xz" ,xz)
+ ("zlib" ,zlib)
+ ("zstd" ,zstd "lib")))
+ (propagated-inputs
+ `(("python-numpy" ,python-numpy)))
+ (native-inputs
+ ;; For building.
+ `(("python-cython" ,python-cython)
+ ;; For testing. Incomplete.
+ ;("python-numcodecs" ,python-numcodecs)
+ ;("python-zarr" ,python-zarr)
+ ;("python-pytest" ,python-pytest)
+ ))
+ (home-page "https://www.lfd.uci.edu/~gohlke/")
+ (synopsis
+ "Image transformation, compression, and decompression codecs")
+ (description
+ "Imagecodecs is a Python library that provides block-oriented, in-memory
+buffer transformation, compression, and decompression functions for use in the
+tifffile, czifile, and other scientific image input/output modules.")
+ (license license:bsd-3)))
+
(define-public python-roifile
(package
(name "python-roifile")
- (version "2020.5.28")
+ (version "2020.11.28")
(source
(origin
(method url-fetch)
(uri (pypi-uri "roifile" version))
(sha256
(base32
- "1vwbwfsw745gyqymff6dllc5zqjsgqmxaw245sw4an6yw9rcbzc0"))))
+ "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
(build-system python-build-system)
(arguments `(#:tests? #f)) ; there are none
(propagated-inputs
@@ -6107,21 +6189,20 @@ regions of interest, geometric shapes, paths, text, etc for image overlays.")
(define-public python-tifffile
(package
(name "python-tifffile")
- (version "2020.6.3")
+ (version "2021.4.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "tifffile" version))
(sha256
(base32
- "0xv3ynkbrsibqvx7250075idb7wm3canjd6lx2nzf3cbp6l07577"))))
+ "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
(build-system python-build-system)
;; Tests require lfdfiles, which depends on tifffile
(arguments `(#:tests? #f))
(propagated-inputs
`(("python-numpy" ,python-numpy)
- ;;("python-lfdfiles" ,python-lfdfiles)
- ("python-roifile" ,python-roifile)))
+ ("python-imagecodecs" ,python-imagecodecs)))
(home-page "https://www.lfd.uci.edu/~gohlke/")
(synopsis "Read and write TIFF(r) files")
(description "This package lets you read image and metadata from many
@@ -6133,19 +6214,28 @@ numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
(define-public python-lfdfiles
(package
(name "python-lfdfiles")
- (version "2020.1.1")
+ (version "2021.2.22")
(source
(origin
(method url-fetch)
(uri (pypi-uri "lfdfiles" version))
(sha256
(base32
- "1n9bkfn4vxl0lbhzd0m35lq86ayx5fwcj3ghpfl2vbjbsnfp3h47"))))
+ "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete pre-generated Cython files.
+ (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
+ #t))))
(build-system python-build-system)
+ (arguments
+ `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
(propagated-inputs
`(("python-click" ,python-click)
("python-numpy" ,python-numpy)
("python-tifffile" ,python-tifffile)))
+ (native-inputs `(("python-cython" ,python-cython)))
(home-page "https://www.lfd.uci.edu/~gohlke/")
(synopsis "Work with LFD data files")
(description