From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#20765: Python .egg files must not be compressed Date: Sun, 07 Jun 2015 22:37:19 +0200 Message-ID: <87zj4btfuo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1hKY-00029M-Be for bug-guix@gnu.org; Sun, 07 Jun 2015 16:38:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1hKU-0006GX-W1 for bug-guix@gnu.org; Sun, 07 Jun 2015 16:38:06 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:34369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1hKU-0006GQ-S2 for bug-guix@gnu.org; Sun, 07 Jun 2015 16:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z1hKU-0000Yl-In for bug-guix@gnu.org; Sun, 07 Jun 2015 16:38:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42637) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1hJz-000276-Kg for bug-guix@gnu.org; Sun, 07 Jun 2015 16:37:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1hJy-00067E-KS for bug-guix@gnu.org; Sun, 07 Jun 2015 16:37:31 -0400 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: 20765@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable The other day on IRC Ricardo and =E5=AE=8B=E6=96=87=E6=AD=A6 noted that pyt= hon-pillow currently comes with a compressed egg. Because it is compressed, the daemon=E2=80=99s conservative scanning fails to see what store items it ref= ers to; in particular Ricardo noted that on his machine, python-pillow refers to a non-existent store item for OpenJPEG. To fix that, python-build-system must be tweaked to ask for uncompressed eggs. I tried the attached patch, which uses the =E2=80=98--always-unzip= =E2=80=99 option of easyinstall. Unfortunately, that option is unsupported by some setup.py, such as that of setuptools itself. What would be the right way to do that? TIA. :-) Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- a/guix/build/python-build-system.scm +++ b/guix/build/python-build-system.scm @@ -60,14 +60,20 @@ #:allow-other-keys) "Install a given Python package." (let* ((out (assoc-ref outputs "out")) - (params (append (list (string-append "--prefix=" out)) + (params (cons* (string-append "--prefix=" out) + + ;; Make sure the .egg files are kept unzipped, + ;; otherwise the daemon's conservative scanning may + ;; not find store references embedded in it. + "--always-unzip" + configure-flags)) (python-version (get-python-version (assoc-ref inputs "python"))) (old-path (getenv "PYTHONPATH")) (add-path (string-append out "/lib/python" python-version "/site-packages/"))) - ;; create the module installation directory and add it to PYTHONPATH - ;; to make setuptools happy + ;; Create the module installation directory and add it to PYTHONPATH + ;; to make setuptools happy. (mkdir-p add-path) (setenv "PYTHONPATH" (string-append (if old-path --=-=-=--