From 4347565cb889a8f37b09f24a94c59a84ef74d0d0 Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Tue, 6 Jan 2026 23:59:26 +0100 Subject: [PATCH] gnu: python-pytorch: Switch to pyproject. * gnu/packages/machine-learning.scm (python-pytorch): [build-system]: Switch to pyproject-build-system. [arguments]<#:tests?>: Relocate field. <#:phases>: Add a fix in phase 'use-system-libraries. Change-Id: I780c1be6d9f1d3359a35a16686d3dd45b3b940f3 Signed-off-by: Sharlatan Hellseher Signed-off-by: Rutherther --- gnu/packages/machine-learning.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index d3865a4c21eabc30d6fa8add45df15368898459e..2f4250585cdb3bd91a24bac41d55af5fd562b571 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -4848,9 +4848,11 @@ PyTorch.") (name "python-pytorch") (version %python-pytorch-version) (source %python-pytorch-src) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list + ;; Even only the core tests take a very long time to run. + #:tests? #f #:phases #~(modify-phases %standard-phases (add-after 'unpack 'patch-build-system @@ -4956,7 +4958,11 @@ PyTorch.") (setenv "USE_QNNPACK" "0")) (substitute* '("requirements.txt" "setup.py") (("sympy>=1\\.13\\.3") - "sympy>=1.13.1")))) + "sympy>=1.13.1")) + ;; Avoid ModuleNotFoundError. + (substitute* "setup.py" + (("from build_bundled import create_bundled" all) + (string-append "return # " all))))) (add-after 'use-system-libraries 'skip-nccl-call (lambda _ ;; Comment-out `checkout_nccl()` invokation in build_pytorch(). @@ -5057,10 +5063,7 @@ PyTorch.") (substitute* (find-files #$output "^entry_points\\.txt$") (("^convert-.*" all) - (string-append "# " all "\n"))))))) - - ;; Even only the core tests take a very long time to run. - #:tests? #f)) + (string-append "# " all "\n"))))))))) (native-inputs (list cmake-minimal doxygen