gnu: python-pytorch: Patch Python build.

* gnu/packages/machine-learning.scm (python-pytorch)[arguments]: Add phases
'patch-build-system to remove "__legacy__".

Change-Id: Ic2243bdb4539cca3a0a0ac955961feeec963c2e5
This commit is contained in:
Ricardo Wurmus 2026-01-17 09:19:25 +01:00
parent e67189651f
commit 29b168b81a
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015-2025 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015-2026 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016, 2020-2024 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016, 2020-2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2017, 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2016, 2017, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
@ -4606,6 +4606,11 @@ PyTorch.")
(list (list
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'patch-build-system
(lambda _
(substitute* "pyproject.toml"
(("setuptools\\.build_meta:__legacy__")
"setuptools.build_meta"))))
(add-after 'unpack 'cmake-patches (add-after 'unpack 'cmake-patches
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "cmake/Dependencies.cmake" (substitute* "cmake/Dependencies.cmake"