From 7b25b2332d1f620097165c7a9e1297cb85f91b95 Mon Sep 17 00:00:00 2001 From: Cayetano Santos Date: Sun, 7 Sep 2025 10:25:13 +0200 Subject: [PATCH] gnu: python-torchfile: Update to 0.1.0-0.fbd434a. * gnu/packages/machine-learning.scm (python-torchfile): Update to 0.1.0-0.fbd434a. [source]: Switch to git-fetch to obtain the latest changes and enable tests. [build-system]: Switch to pyproject-build-system. [arguments]: Enable tests. [propagated-inputs]: Add python-setuptools-next. Change-Id: I02f94fa4e3b78fd1d3e8e3e80ce3f16fd56e38fa Signed-off-by: Sharlatan Hellseher --- gnu/packages/machine-learning.scm | 49 +++++++++++++++++++------------ 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 8ad62bd55d39dbffdc209df627d92336d712f29d..07fcde14abd5172da76e676a797400da1e264641 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -5899,24 +5899,37 @@ and common image transformations for computer vision.") (license license:bsd-3))) (define-public python-torchfile - (package - (name "python-torchfile") - (version "0.1.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "torchfile" version)) - (sha256 - (base32 - "0vhklj6krl9r0kdynb4kcpwp8y1ihl2zw96byallay3k9c9zwgd5")))) - (build-system python-build-system) - (arguments '(#:tests? #false)) ;there are no tests - (propagated-inputs - (list python-numpy)) - (home-page "https://github.com/bshillingford/python-torchfile") - (synopsis "Torch7 binary serialized file parser") - (description "This package enables you to deserialize Lua torch-serialized objects from -Python.") - (license license:bsd-3))) + ;; Latest release is nine years old. + (let ((commit "fbd434a5b5562c88b91a95e6476e11dbb7735436") + (revision "0")) + (package + (name "python-torchfile") + (version (git-version "0.1.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/bshillingford/python-torchfile/") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1f03ks5n3i3cdh16wx5ysxsxh0ai9vpf0k5pdx759vf31f4niz36")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python3" "tests.py"))))))) + (propagated-inputs + (list python-numpy python-setuptools-next)) + (home-page "https://github.com/bshillingford/python-torchfile") + (synopsis "Torch7 binary serialized file parser") + (description "This package enables you to deserialize Lua +torch-serialized objects from Python.") + (license license:bsd-3)))) (define-public python-geomloss (package