guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: python-pillow: Disable egg compression.


From: Ludovic Courtès
Subject: 02/02: gnu: python-pillow: Disable egg compression.
Date: Mon, 20 Jul 2015 21:17:24 +0000

civodul pushed a commit to branch master
in repository guix.

commit e5358a6bacc6a0e690071fb668634263d1f53ec0
Author: Ludovic Courtès <address@hidden>
Date:   Mon Jul 20 23:15:24 2015 +0200

    gnu: python-pillow: Disable egg compression.
    
    Partly fixes <http://bugs.gnu.org/20765>.
    
    * gnu/packages/python.scm (python-pillow)[arguments]: Rewrite using
      'modify-phases'.  Add 'disable-egg-compression' phase.
---
 gnu/packages/python.scm |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 4962a57..7709fbd 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3015,14 +3015,27 @@ services for your Python modules and applications.")
      `(;; Used at runtime for pkg_resources
        ("python-setuptools" ,python-setuptools)))
     (arguments
-     `(#:phases (alist-cons-after
-                 'install 'check-installed
-                 (lambda _
-                   (begin
-                     (setenv "HOME" (getcwd))
-                     (and (zero? (system* "python" "selftest.py" 
"--installed"))
-                          (zero? (system* "python" "test-installed.py")))))
-                 (alist-delete 'check %standard-phases))))
+     `(#:phases (modify-phases %standard-phases
+                  (add-before
+                   'install 'disable-egg-compression
+                   (lambda _
+                     ;; Leave the .egg uncompressed since compressing it would
+                     ;; prevent the GC from identifying run-time dependencies.
+                     ;; See <http://bugs.gnu.org/20765>.
+                     (let ((port (open-file "setup.cfg" "a")))
+                       (display "\n[easy_install]\nzip_ok = 0\n"
+                                port)
+                       (close-port port)
+                       #t)))
+                  (add-after
+                   'install 'check-installed
+                   (lambda _
+                     (begin
+                       (setenv "HOME" (getcwd))
+                       (and (zero? (system* "python" "selftest.py"
+                                            "--installed"))
+                            (zero? (system* "python" "test-installed.py"))))))
+                 (delete 'check))))
     (home-page "https://pypi.python.org/pypi/Pillow";)
     (synopsis "Fork of the Python Imaging Library")
     (description



reply via email to

[Prev in Thread] Current Thread [Next in Thread]