summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2025-09-06 17:12:15 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-09-06 17:20:14 +0100
commitad1941a08f31012d3de2099e8fb5f18df38b4afb (patch)
tree30035065eb1963d367d60d00863157c8659c8f28
parentf4ca04a820474562e51d8c27f81fe68052753154 (diff)
gnu: python-tables: Update to 3.10.2.
* gnu/packages/python-xyz.scm (python-tables): Update to 3.10.2. [build-system]: Switch to pyproject-build-system. [phases]{set-LD_LIBRARY_PATH}: Replace by {pre-build} with setting up environment variables for each library path which is available in setup.py. Regenerate C code with Cython before build. {pre-check}: New phase. {check}: Rework test invocation to run just bare minimal test suite, add a notes popping up during tests invocation describing it. [native-inputs]: Add python-pytest, python-setuptools-next, and python-sphinx. [inputs]: Remove hdf5-1.10, and zlib; add bzip2, and hdf5. Fixes: guix/guix#2342. Change-Id: Ia1d00979123e459640d74a0dfd7fd52b25f8b9b7
-rw-r--r--gnu/packages/python-xyz.scm49
1 files changed, 37 insertions, 12 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 966693104a6..98315dfb497 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17809,18 +17809,20 @@ tasks, sockets, files, locks, and queues.")
(define-public python-tables
(package
(name "python-tables")
- (version "3.10.1")
+ (version "3.10.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "tables" version))
(sha256
(base32
- "1kr6y4qivqy462gva4bqym3x4alhxijfqjplxax3gh5r6k3pm82a"))
+ "0469jrkmp0qv8cmlqkizm3b8imyc97mk9pfn66ldpyl6f4m82i15"))
(snippet '(begin
(use-modules (guix build utils))
+ ;; TODO: Unbundle.
+ ;; (delete-file-recursively "hdf5-blosc")
(delete-file-recursively "c-blosc")))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
(list
#:phases
@@ -17839,25 +17841,48 @@ tasks, sockets, files, locks, and queues.")
"\""
(search-input-file inputs "/lib/libblosc2.so")
"\",\n" m)))))
- (add-before 'build 'set-LD_LIBRARY_PATH
+ (add-before 'build 'pre-build
+ (lambda _
+ (invoke "make" "distclean") ;Regenerate C code with Cython
+ (setenv "BLOSC2_DIR" #$(this-package-input "cblosc2"))
+ (setenv "BLOSC_DIR" #$(this-package-input "c-blosc"))
+ (setenv "BZIP2_DIR" #$(this-package-input "bzip2"))
+ (setenv "HDF5_DIR" #$(this-package-input "hdf5"))
+ (setenv "LZO_DIR" #$(this-package-input "lzo"))))
+ (add-before 'check 'pre-check
(lambda _
- ;; The setup.py build system makes use of ctypes.CDLL, which
- ;; uses dlopen, which looks up library names from standard
- ;; locations or LD_LIBRARY_PATH.
- (setenv "LD_LIBRARY_PATH" (getenv "LIBRARY_PATH"))))
+ (setenv "HOME" "/tmp")))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (invoke "python" "setup.py" "check")))))))
+ (with-directory-excursion "/tmp"
+ ;; Performing only a light (yet comprehensive) subset of the
+ ;; test suite. If you want a more complete test, try
+ ;; passing the --heavy flag to this script (or set the
+ ;; 'heavy' parameter in case you are using tables.test()
+ ;; call). The whole suite will take more than 4 hours to
+ ;; complete on a relatively modern CPU and around 512 MB of
+ ;; main memory.
+ (invoke "python" "-m" "tables.tests.test_all"))))))))
+ (native-inputs
+ (list pkg-config
+ python-cython
+ python-pytest
+ python-setuptools-next
+ python-sphinx))
+ (inputs
+ (list bzip2
+ c-blosc
+ c-blosc2
+ hdf5
+ lzo))
(propagated-inputs
(list python-blosc2
- python-numpy
python-numexpr
+ python-numpy
python-packaging
python-py-cpuinfo
python-typing-extensions))
- (native-inputs (list pkg-config python-cython))
- (inputs (list c-blosc c-blosc2 hdf5-1.10 bzip2 lzo zlib))
(home-page "https://www.pytables.org/")
(synopsis "Hierarchical datasets for Python")
(description "PyTables is a package for managing hierarchical datasets and