From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <1365201913-8533-1-git-send-email-tipecaml@gmail.com> References: <87mwteaf53.fsf@karetnikov.org> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:49644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOFZ6-0001bv-F5 for bug-guix@gnu.org; Fri, 05 Apr 2013 18:57:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UOFZ4-0002TQ-Kf for bug-guix@gnu.org; Fri, 05 Apr 2013 18:57:00 -0400 Received: from mail-wg0-x22a.google.com ([2a00:1450:400c:c00::22a]:39192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UOFZ4-0002TH-Dj for bug-guix@gnu.org; Fri, 05 Apr 2013 18:56:58 -0400 Received: by mail-wg0-f42.google.com with SMTP id k13so2219967wgh.3 for ; Fri, 05 Apr 2013 15:56:56 -0700 (PDT) In-Reply-To: <87mwteaf53.fsf@karetnikov.org> 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: bug-guix@gnu.org 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