From 9d7eef243fca8e53fb89bb17a999f0678d191caf Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 19 Mar 2017 02:43:37 -0400 Subject: [PATCH] gnu: address@hidden: Fix build failure due to missing libffi. * gnu/packages/python.scm (python-2)[arguments]: Add 'setenv' phase. (python2-minimal)[inputs]: Add zlib. Co-authored-by: Danny Milosavljevic --- gnu/packages/python.scm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index be452f062..95bf53c8f 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2015, 2016 Efraim Flashner ;;; Copyright © 2015 Kyle Meyer ;;; Copyright © 2015, 2016 Chris Marusich -;;; Copyright © 2016 Danny Milosavljevic +;;; Copyright © 2016, 2017 Danny Milosavljevic ;;; Copyright © 2016 Lukas Gradl ;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2016 Daniel Pimentel @@ -223,6 +223,19 @@ (setenv "HOME" (getcwd)) #t)) (add-after + 'unpack 'setenv + (lambda _ + ;; 'Modules/_ctypes/libffi/configure' contains scripts embedded in + ;; HEREDOCs whose shebangs aren't patched by the patch-shebang + ;; phase. Setting this variables works around that shortcoming and + ;; allows us to keep using the bundled libffi in python-minimal and + ;; python2-minimal. + ;; XXX The bundled libffi will be removed in Python 3.7: + ;; https://bugs.python.org/issue27976 + ;; https://github.com/python/cpython/commit/935043d1ac19d07ac48233c6175250e66a7bbebd + ;; https://github.com/python/cpython/commit/f40d4ddff3c800b3c956a5e8820aabe3aa87cddd + (setenv "CONFIG_SHELL" (which "sh")))) + (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 @@ -363,7 +376,7 @@ data types.") (substitute-keyword-arguments (package-arguments python-2) ((#:configure-flags cf) `(append ,cf '("--without-system-ffi"))))) - (inputs '()))) ;none of the optional dependencies + (inputs `(("zlib" ,zlib))))) (define-public python-minimal (package (inherit python) -- 2.12.0