unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: Danny Milosavljevic <dannym@scratchpost.org>
Cc: 26136@debbugs.gnu.org
Subject: bug#26136: core-updates: python-minimal@2.7.13 fails due to missing zlib
Date: Sun, 19 Mar 2017 15:19:50 -0400	[thread overview]
Message-ID: <20170319191950.GA14148@jasmine> (raw)
In-Reply-To: <20170318211901.35ed1744@scratchpost.org>


[-- Attachment #1.1: Type: text/plain, Size: 1232 bytes --]

On Sat, Mar 18, 2017 at 09:19:01PM +0100, Danny Milosavljevic wrote:
> An alternative workaround is to use this instead:
> 
> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index be452f062..04c944d84 100644
> --- a/gnu/packages/python.scm12/bin/shore-updates/guix$ /gnu/store/k7029k5va68lka
> +++ b/gnu/packages/python.scm
> @@ -229,6 +229,8 @@
>             ;; before 1980".  Work around this by setting the file times in the
>             ;; source tree to sometime in early 1980.
>             (lambda _
> +             (setenv "CONFIG_SHELL" (which "bash"))
> +

I think this is the better solution to the libffi / ctypes issue. It
also fixes python-minimal@3 to use the bundled libffi. We added libffi
to python-minimal@3's inputs in
d0b73960db051baa468fc1a0fbab21fa9f89f885 to work around a similar issue.

In Python 3.7, the bundled libffi will be removed, and we will have to
build our minimal Python-3 variant with an external libffi package:

https://bugs.python.org/issue27976

Here's a patch that fixes this problem for python-minimal@2. I don't
want to change python-minimal@3 this late in the core-updates cycle; we
can do it in a python-updates branch after core-updates.

[-- Attachment #1.2: 0001-gnu-python-minimal-2-Fix-build-failure-due-to-missin.patch --]
[-- Type: text/plain, Size: 2725 bytes --]

From 9d7eef243fca8e53fb89bb17a999f0678d191caf Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Sun, 19 Mar 2017 02:43:37 -0400
Subject: [PATCH] gnu: python-minimal@2: 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 <dannym@scratchpost.org>
---
 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 <efraim@flashner.co.il>
 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
-;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
+;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
@@ -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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-03-19 19:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-17  1:46 bug#26136: core-updates: python-minimal@2.7.13 fails due to missing zlib Leo Famulari
2017-03-17 14:08 ` Danny Milosavljevic
2017-03-18 17:26   ` Leo Famulari
2017-03-18 20:19     ` Danny Milosavljevic
2017-03-19 19:19       ` Leo Famulari [this message]
2017-03-19 19:26       ` Leo Famulari
2017-03-19 20:15         ` Leo Famulari
2017-03-19 21:40           ` Ludovic Courtès
2017-03-19 23:02             ` Ludovic Courtès
2017-03-18 20:50     ` Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170319191950.GA14148@jasmine \
    --to=leo@famulari.name \
    --cc=26136@debbugs.gnu.org \
    --cc=dannym@scratchpost.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).