[Top][All Lists]

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

Fwd: [PATCH] gnu: Enable the 'ctypes' module in Python.

From: Cyril Roelandt
Subject: Fwd: [PATCH] gnu: Enable the 'ctypes' module in Python.
Date: Sat, 01 Feb 2014 01:47:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

Forgot to CC this to -devel.


-------- Original Message --------
Return-Path: <address@hidden>
Received: from localhost.localdomain ( []) by with ESMTPSA id uq2sm23377356wjc.5.2014. for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Jan 2014 16:47:23 -0800 (PST)
From: Cyril Roelandt <address@hidden>
To: address@hidden
Cc: Cyril Roelandt <address@hidden>
Subject: [PATCH] gnu: Enable the 'ctypes' module in Python.
Date: Sat,  1 Feb 2014 01:46:00 +0100
Message-Id: <address@hidden>
X-Mailer: git-send-email 1.8.4.rc3

* gnu/packages/python.scm (python-2): add libffi to the inputs and use it to
  build the ctypes module.
 gnu/packages/python.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 6d2c940..260bace 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 patchelf)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages sqlite)
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -98,10 +100,12 @@
         (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,7 +142,9 @@
      `(("bzip2" ,bzip2)
        ("gdbm" ,gdbm)
+       ("libffi" ,libffi)                         ; for ctypes
        ("openssl" ,openssl)
+       ("pkg-config" ,pkg-config)
        ("readline" ,readline)
        ("zlib" ,zlib)
        ("patchelf" ,patchelf)))                   ; for (guix build rpath)

Attachment: Attached Message Part
Description: Text document

reply via email to

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