From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: [PATCH 1/5] gnu: Enable the 'ctypes' module in Python. Date: Fri, 7 Mar 2014 03:47:31 +0100 Message-ID: <1394160455-32580-2-git-send-email-tipecaml@gmail.com> References: <1394160455-32580-1-git-send-email-tipecaml@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLkv0-0007bE-Ah for guix-devel@gnu.org; Thu, 06 Mar 2014 21:53:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLkur-0006zq-TX for guix-devel@gnu.org; Thu, 06 Mar 2014 21:53:50 -0500 Received: from mail-wg0-x22c.google.com ([2a00:1450:400c:c00::22c]:42974) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLkur-0006yA-My for guix-devel@gnu.org; Thu, 06 Mar 2014 21:53:41 -0500 Received: by mail-wg0-f44.google.com with SMTP id m15so1832927wgh.15 for ; Thu, 06 Mar 2014 18:53:40 -0800 (PST) In-Reply-To: <1394160455-32580-1-git-send-email-tipecaml@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * gnu/packages/python.scm (python-2): add libffi to the inputs and use it to build the ctypes module. --- gnu/packages/python.scm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 44e3c14..8f92dc2 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -27,9 +27,11 @@ #:use-module (gnu packages compression) #:use-module (gnu packages gdbm) #:use-module (gnu packages icu4c) + #:use-module (gnu packages libffi) #:use-module (gnu packages readline) #:use-module (gnu packages openssl) #:use-module (gnu packages elf) + #:use-module (gnu packages pkg-config) #:use-module (gnu packages sqlite) #:use-module (guix packages) #:use-module (guix download) @@ -98,10 +100,12 @@ #:configure-flags (let ((bz2 (assoc-ref %build-inputs "bzip2")) (gdbm (assoc-ref %build-inputs "gdbm")) + (libffi (assoc-ref %build-inputs "libffi")) (openssl (assoc-ref %build-inputs "openssl")) (readline (assoc-ref %build-inputs "readline")) (zlib (assoc-ref %build-inputs "zlib"))) (list "--enable-shared" ; allow embedding + "--with-system-ffi" ; build ctypes (string-append "CPPFLAGS=" "-I" bz2 "/include " "-I" gdbm "/include " @@ -111,6 +115,7 @@ (string-append "LDFLAGS=" "-L" bz2 "/lib " "-L" gdbm "/lib " + "-L" libffi "/lib " "-L" openssl "/lib " "-L" readline "/lib " "-L" zlib "/lib"))) @@ -137,10 +142,13 @@ (inputs `(("bzip2" ,bzip2) ("gdbm" ,gdbm) + ("libffi" ,libffi) ; for ctypes ("openssl" ,openssl) ("readline" ,readline) ("zlib" ,zlib) ("patchelf" ,patchelf))) ; for (guix build rpath) + (native-inputs + `(("pkg-config" ,pkg-config))) (native-search-paths (list (search-path-specification (variable "PYTHONPATH") -- 1.8.4.rc3