guix_mirror_bot pushed a commit to branch next-master
in repository guix.
commit 74f534d949e82edfa9260b258f77115ffc635447
Author: Nicolas Graves <[email protected]>
AuthorDate: Tue Jan 6 23:59:26 2026 +0100
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 <[email protected]>
---
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 2032143071..ffe9470bbf 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 'cmake-patches
@@ -4951,7 +4953,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().
@@ -5052,10 +5058,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