From 46472ecd006e7fd5e36056b2c7a0f3023d4efbd7 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Wed, 15 Jul 2015 13:31:51 -0400 Subject: gnu: python: Set source file times to 1980 to fix test. * gnu/packages/python.scm (python-2)[arguments]: Use 'modify-phases'. Return true from phases where needed. Add 'set-source-file-times-to-1980' phase. Add (ice-9 ftw) to #:modules. --- gnu/packages/python.scm | 50 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 5dcaba0871..9ceb5b2f5e 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -155,24 +155,40 @@ "-L" zlib "/lib " "-Wl,-rpath=" out "/lib"))) + #:modules ((ice-9 ftw) + ,@%gnu-build-system-modules) #:phases - (alist-cons-before - 'configure 'patch-lib-shells - (lambda _ - ;; Filter for existing files, since some may not exist in all - ;; versions of python that are built with this recipe. - (substitute* (filter file-exists? - '("Lib/subprocess.py" - "Lib/popen2.py" - "Lib/distutils/tests/test_spawn.py" - "Lib/test/test_subprocess.py")) - (("/bin/sh") (which "sh")))) - (alist-cons-before - 'check 'pre-check - (lambda _ - ;; 'Lib/test/test_site.py' needs a valid $HOME - (setenv "HOME" (getcwd))) - %standard-phases)))) + (modify-phases %standard-phases + (add-before + 'configure 'patch-lib-shells + (lambda _ + ;; Filter for existing files, since some may not exist in all + ;; versions of python that are built with this recipe. + (substitute* (filter file-exists? + '("Lib/subprocess.py" + "Lib/popen2.py" + "Lib/distutils/tests/test_spawn.py" + "Lib/test/test_subprocess.py")) + (("/bin/sh") (which "sh"))) + #t)) + (add-before + 'check 'pre-check + (lambda _ + ;; 'Lib/test/test_site.py' needs a valid $HOME + (setenv "HOME" (getcwd)) + #t)) + (add-after + 'unpack 'set-source-file-times-to-1980 + ;; XXX One of the tests uses a ZIP library to pack up some of the + ;; source tree, and fails with "ZIP does not support timestamps + ;; before 1980". Work around this by setting the file times in the + ;; source tree to sometime in early 1980. + (lambda _ + (let ((circa-1980 (* 10 366 24 60 60))) + (ftw "." (lambda (file stat flag) + (utime file circa-1980 circa-1980) + #t)) + #t)))))) (inputs `(("bzip2" ,bzip2) ("gdbm" ,gdbm) -- cgit v1.2.3 ps://lists.gnu.org/archive/html/guix-devel/2017-11/msg00106.html>. * gnu.scm (%try-use-modules): New procedure. (package-module-hint, service-module-hint): New procedures. (try-use-modules): New macro. (use-package-modules, use-service-modules, use-system-modules): Use it. * tests/guix-system.sh: Test it. Ludovic Courtès 2017-05-16bootloader: Add extlinux support....* gnu/bootloader.scm: New file. * gnu/bootloader/extlinux.scm: New file. * gnu/bootloader/grub.scm: New file. * gnu/local.mk: Build new files. * gnu/system.scm: Adapt to new bootloader api. * gnu/scripts/system.scm: Adapt to new bootloader api. * gnu.scm: Remove (gnu system grub) and replace by (gnu bootloader) and (gnu bootloader grub) modules. * gnu/system/grub.scm: Moved content to gnu/bootloader/grub.scm. * gnu/system/vm: Replace (gnu system grub) module by (gnu bootloader). * gnu/tests.scm: Ditto. * gnu/tests/nfs.scm: Ditto. Mathieu Othacehe 2016-04-18system: Add (gnu system mapped-devices)....* gnu/system/file-systems.scm (<mapped-device>, <mapped-device-type>): Move to... * gnu/system/mapped-devices.scm: ... here. New file. * gnu/system.scm, gnu/services/base.scm, gnu/system/linux-initrd.scm: Use it. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * gnu.scm (%public-modules): Add it. Ludovic Courtès 2015-11-03system: Rename (gnu system linux) to (gnu system pam)....* gnu/system/linux.scm: Rename to... * gnu/system/pam.scm: ... this. * gnu-system.am (GNU_SYSTEM_MODULES): Adjust accordingly. * gnu.scm, gnu/services/base.scm, gnu/services/desktop.scm, gnu/services/networking.scm, gnu/services/ssh.scm, gnu/services/xorg.scm, gnu/system.scm, gnu/system/vm.scm: Likewise. Ludovic Courtès