summaryrefslogtreecommitdiff
path: root/gnu/packages/python.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2020-10-21 22:27:30 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-01-12 22:00:42 -0500
commitf1eea19c9ae27e5d275b083bbf280e5b59e5e57a (patch)
tree3258a8b8303ad3cf11e6cdab45f02a1aa0735525 /gnu/packages/python.scm
parent44b0ffcf00f2150c120ecf82003ab10a93fe2184 (diff)
gnu: python-3.8: Apply python-3-arm-alignment.patch unconditionally.
* gnu/packages/python.scm (python-3.8)[source]: Add "python-3-arm-alignment.patch" to the patches field. [phases]{apply-alignment-patch}: Remove phase. [native-inputs]: Remove arm-alignment.patch.
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r--gnu/packages/python.scm27
1 files changed, 2 insertions, 25 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index c0686b01286..25ad86f204d 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -371,6 +371,7 @@ data types.")
371 (uri (string-append "https://www.python.org/ftp/python/" 371 (uri (string-append "https://www.python.org/ftp/python/"
372 version "/Python-" version ".tar.xz")) 372 version "/Python-" version ".tar.xz"))
373 (patches (search-patches 373 (patches (search-patches
374 "python-3-arm-alignment.patch"
374 "python-3-fix-tests.patch" 375 "python-3-fix-tests.patch"
375 "python-3.8-fix-tests.patch" 376 "python-3.8-fix-tests.patch"
376 "python-3-deterministic-build-info.patch" 377 "python-3-deterministic-build-info.patch"
@@ -473,33 +474,9 @@ data types.")
473 ,file))) 474 ,file)))
474 (find-files out "\\.py$"))) 475 (find-files out "\\.py$")))
475 (list '() '("-O") '("-OO"))) 476 (list '() '("-O") '("-OO")))
476 #t))) 477 #t)))))))
477 ;; XXX: Apply patch on ARM platforms only to avoid a full rebuild.
478 ;; Remove this phase in the next rebuild cycle.
479 ,@(let ((system (or (%current-target-system)
480 (%current-system))))
481 (if (any (cute string-prefix? <> system)
482 '("arm" "aarch64"))
483 '((add-after 'unpack 'apply-alignment-patch
484 (lambda* (#:key native-inputs inputs #:allow-other-keys)
485 (invoke "patch" "-p1" "--force" "--input"
486 (assoc-ref (or native-inputs inputs)
487 "arm-alignment.patch")))))
488 '()))))))
489 (native-inputs 478 (native-inputs
490 `(("tzdata" ,tzdata-for-tests) 479 `(("tzdata" ,tzdata-for-tests)
491
492 ;; Disable unaligned accesses in the sha3 module on ARM as
493 ;; it causes a test failure when building 32-bit Python on a
494 ;; 64-bit kernel. See <https://bugs.python.org/issue36515>.
495 ;; TODO: make this a regular patch in the next rebuild cycle.
496 ,@(let ((system (or (%current-target-system)
497 (%current-system))))
498 (if (any (cute string-prefix? <> system)
499 '("arm" "aarch64"))
500 `(("arm-alignment.patch" ,(search-patch "python-3-arm-alignment.patch")))
501 '()))
502
503 ,@(if (%current-target-system) 480 ,@(if (%current-target-system)
504 `(("python3" ,this-package)) 481 `(("python3" ,this-package))
505 '()) 482 '())