bug-guix
[Top][All Lists]
Advanced

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

[PATCH] gnu: Python: fix the compilation of some modules from the standa


From: Cyril Roelandt
Subject: [PATCH] gnu: Python: fix the compilation of some modules from the standard library.
Date: Sat, 6 Apr 2013 00:45:13 +0200

This commit enables the bz2, readline, ssl and zlib modules.
---
On 04/04/2013 10:12 AM, Nikita Karetnikov wrote:
> Do you know how to fix the problem with 'bz2'?

This patch is much cleaner that my previous one, and fixes bz2, readline, ssl
and zlib.

I still need to fix dbm. Python looks for ndbm.h, gdbm/ndbm.h, gdbm-ndbm.h, but
we use gdbm.h. Using gdbm's compatibility mode, we can install ndbm.h, but this
does not install libndbm.so. We could create a symlink from libndbm.so to
libgdbm.so, but that would be quite ugly, so I think I'm gonna have to fix this
directly in Python, which may take some time.

Another popular module that does not work yet is Tkinter, because it uses Tk,
which depends on X.

Feel free to push this patch if it works for you.

Cyril.

 gnu/packages/python.scm |   24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 52b11e4..c62b8c0 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -20,6 +20,7 @@
 (define-module (gnu packages python)
   #:use-module ((guix licenses) #:select (psfl))
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages readline)
   #:use-module (gnu packages openssl)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -38,11 +39,28 @@
        (base32
         "11f9aw855lrmknr6c82gm1ijr3n0smc6idyp94y7774yivjnplv1"))))
     (build-system gnu-build-system)
-    (arguments `(#:tests? #f)) ; XXX: some tests fail
+    (arguments
+     `(#:tests? #f ; XXX: some tests fail
+       #:configure-flags
+        (let ((bz2 (assoc-ref %build-inputs "bzip2"))
+              (openssl (assoc-ref %build-inputs "openssl"))
+              (readline (assoc-ref %build-inputs "readline"))
+              (zlib (assoc-ref %build-inputs "zlib")))
+         (list (string-append "CPPFLAGS="
+                "-I" bz2 "/include "
+                "-I" openssl "/include "
+                "-I" readline "/include "
+                "-I" zlib "/include")
+               (string-append "LDFLAGS="
+                "-L" bz2 "/lib "
+                "-L" openssl "/lib "
+                "-L" readline "/lib "
+                "-L" zlib "/lib")))))
     (inputs
-     `(("zlib" ,zlib)
+     `(("bzip2" ,bzip2)
        ("openssl" ,openssl)
-       ("bzip2" ,bzip2)))
+       ("readline" ,readline)
+       ("zlib" ,zlib)))
     (home-page "http://python.org";)
     (synopsis
      "Python, a high-level dynamically-typed programming language")
-- 
1.7.10.4




reply via email to

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