gnu: Enable the 'ctypes' module in Python.
* gnu/packages/python.scm (python-2): add libffi to the inputs and use it to build the ctypes module.
This commit is contained in:
parent
d452b595f9
commit
b10ab7230f
|
@ -28,9 +28,11 @@
|
||||||
#:use-module (gnu packages compression)
|
#:use-module (gnu packages compression)
|
||||||
#:use-module (gnu packages gdbm)
|
#:use-module (gnu packages gdbm)
|
||||||
#:use-module (gnu packages icu4c)
|
#:use-module (gnu packages icu4c)
|
||||||
|
#:use-module (gnu packages libffi)
|
||||||
#:use-module (gnu packages readline)
|
#:use-module (gnu packages readline)
|
||||||
#:use-module (gnu packages openssl)
|
#:use-module (gnu packages openssl)
|
||||||
#:use-module (gnu packages elf)
|
#:use-module (gnu packages elf)
|
||||||
|
#:use-module (gnu packages pkg-config)
|
||||||
#:use-module (gnu packages sqlite)
|
#:use-module (gnu packages sqlite)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
|
@ -99,10 +101,12 @@
|
||||||
#:configure-flags
|
#:configure-flags
|
||||||
(let ((bz2 (assoc-ref %build-inputs "bzip2"))
|
(let ((bz2 (assoc-ref %build-inputs "bzip2"))
|
||||||
(gdbm (assoc-ref %build-inputs "gdbm"))
|
(gdbm (assoc-ref %build-inputs "gdbm"))
|
||||||
|
(libffi (assoc-ref %build-inputs "libffi"))
|
||||||
(openssl (assoc-ref %build-inputs "openssl"))
|
(openssl (assoc-ref %build-inputs "openssl"))
|
||||||
(readline (assoc-ref %build-inputs "readline"))
|
(readline (assoc-ref %build-inputs "readline"))
|
||||||
(zlib (assoc-ref %build-inputs "zlib")))
|
(zlib (assoc-ref %build-inputs "zlib")))
|
||||||
(list "--enable-shared" ; allow embedding
|
(list "--enable-shared" ; allow embedding
|
||||||
|
"--with-system-ffi" ; build ctypes
|
||||||
(string-append "CPPFLAGS="
|
(string-append "CPPFLAGS="
|
||||||
"-I" bz2 "/include "
|
"-I" bz2 "/include "
|
||||||
"-I" gdbm "/include "
|
"-I" gdbm "/include "
|
||||||
|
@ -112,6 +116,7 @@
|
||||||
(string-append "LDFLAGS="
|
(string-append "LDFLAGS="
|
||||||
"-L" bz2 "/lib "
|
"-L" bz2 "/lib "
|
||||||
"-L" gdbm "/lib "
|
"-L" gdbm "/lib "
|
||||||
|
"-L" libffi "/lib "
|
||||||
"-L" openssl "/lib "
|
"-L" openssl "/lib "
|
||||||
"-L" readline "/lib "
|
"-L" readline "/lib "
|
||||||
"-L" zlib "/lib")))
|
"-L" zlib "/lib")))
|
||||||
|
@ -138,10 +143,13 @@
|
||||||
(inputs
|
(inputs
|
||||||
`(("bzip2" ,bzip2)
|
`(("bzip2" ,bzip2)
|
||||||
("gdbm" ,gdbm)
|
("gdbm" ,gdbm)
|
||||||
|
("libffi" ,libffi) ; for ctypes
|
||||||
("openssl" ,openssl)
|
("openssl" ,openssl)
|
||||||
("readline" ,readline)
|
("readline" ,readline)
|
||||||
("zlib" ,zlib)
|
("zlib" ,zlib)
|
||||||
("patchelf" ,patchelf))) ; for (guix build rpath)
|
("patchelf" ,patchelf))) ; for (guix build rpath)
|
||||||
|
(native-inputs
|
||||||
|
`(("pkg-config" ,pkg-config)))
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
(list (search-path-specification
|
(list (search-path-specification
|
||||||
(variable "PYTHONPATH")
|
(variable "PYTHONPATH")
|
||||||
|
|
Loading…
Reference in New Issue