unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20765: Python .egg files must not be compressed
@ 2015-06-07 20:37 Ludovic Courtès
  2015-07-20 21:22 ` Ludovic Courtès
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Ludovic Courtès @ 2015-06-07 20:37 UTC (permalink / raw)
  To: 20765

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

The other day on IRC Ricardo and 宋文武 noted that python-pillow
currently comes with a compressed egg.  Because it is compressed, the
daemon’s conservative scanning fails to see what store items it refers
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 ‘--always-unzip’
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’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1207 bytes --]

--- 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2016-12-17 18:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-07 20:37 bug#20765: Python .egg files must not be compressed Ludovic Courtès
2015-07-20 21:22 ` Ludovic Courtès
2015-10-13 13:38 ` Ricardo Wurmus
2015-10-13 14:10   ` Ludovic Courtès
2015-10-13 14:32     ` Ricardo Wurmus
2016-02-09  4:54 ` bug#20765: (no subject) Leo Famulari
2016-02-09 21:37   ` Ludovic Courtès
2016-04-06 18:17     ` Andreas Enge
2016-04-06 20:52       ` bug#20765: Compressed eggs (Python) Ludovic Courtès
2016-04-18 19:21 ` Hartmut Goebel
2016-12-17 18:43   ` Leo Famulari

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).