unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Cyril Roelandt <tipecaml@gmail.com>
To: bug-guix@gnu.org
Subject: [PATCH] gnu: Python: fix the compilation of some modules from the standard library.
Date: Sat,  6 Apr 2013 00:45:13 +0200	[thread overview]
Message-ID: <1365201913-8533-1-git-send-email-tipecaml@gmail.com> (raw)
In-Reply-To: <87mwteaf53.fsf@karetnikov.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

  reply	other threads:[~2013-04-05 22:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02 14:32 Python: Zlib support Nikita Karetnikov
2013-04-02 18:25 ` Cyril Roelandt
2013-04-03  4:00   ` Nikita Karetnikov
2013-04-03  8:35   ` Ludovic Courtès
2013-04-03 21:33     ` [PATCH] gnu: Fix zlib support in Python Cyril Roelandt
2013-04-04  8:12       ` Nikita Karetnikov
2013-04-05 22:45         ` Cyril Roelandt [this message]
2013-04-06 14:09           ` [PATCH] gnu: Python: fix the compilation of some modules from the standard library Ludovic Courtès
2013-04-06 18:48             ` [PATCH] gnu: Python: enable the dbm module Cyril Roelandt
2013-04-06 22:39               ` Ludovic Courtès
2013-04-07 14:11                 ` [PATCH] gnu: Python: fix the compilation of some modules from the standard library Cyril Roelandt
2013-04-07 14:29                   ` Ludovic Courtès
2013-04-15 20:39                   ` [PATCH] gnu: Python: bump to version 2.7.4 Cyril Roelandt
2013-04-15 21:47                     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1365201913-8533-1-git-send-email-tipecaml@gmail.com \
    --to=tipecaml@gmail.com \
    --cc=bug-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).