python: new module cffi
authorOli Vogt <oli.vogt.pub01@gmail.com>
Tue, 20 May 2014 01:53:00 +0000 (13:53 +1200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 29 Jul 2014 19:31:32 +0000 (21:31 +0200)
Foreign Function Interface for Python calling C code.

[Thomas: add dependency on host-pkgconf and libffi, enable on Python 3
since the module builds fine and loads fine with Python 3 as well.]

Signed-off-by: oli vogt <oli.vogt.pub01@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/Config.in
package/python-cffi/Config.in [new file with mode: 0644]
package/python-cffi/python-cffi.mk [new file with mode: 0644]

index 11087dac79d5614ab3ea620aa29742a88e6ce73a..29b8e6b6d5b45f2938afb0522862be7317b82a41 100644 (file)
@@ -469,6 +469,7 @@ endif
 if BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
 menu "external python modules"
        source "package/python-bottle/Config.in"
+       source "package/python-cffi/Config.in"
        source "package/python-configobj/Config.in"
        source "package/python-crc16/Config.in"
        source "package/python-daemon/Config.in"
diff --git a/package/python-cffi/Config.in b/package/python-cffi/Config.in
new file mode 100644 (file)
index 0000000..f18ed96
--- /dev/null
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_PYTHON_CFFI
+       bool "python-cffi"
+       depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
+       select BR2_PACKAGE_LIBFFI
+       help
+         This is the Foreign Function Interface for Python calling C
+         code.  The aim of this project is to provide a convenient
+         and reliable way of calling C code from Python.
+
+         https://pypi.python.org/pypi/cffi
diff --git a/package/python-cffi/python-cffi.mk b/package/python-cffi/python-cffi.mk
new file mode 100644 (file)
index 0000000..8499a7b
--- /dev/null
@@ -0,0 +1,15 @@
+################################################################################
+#
+# python-cffi
+#
+################################################################################
+
+PYTHON_CFFI_VERSION = 0.8.2
+PYTHON_CFFI_SOURCE = cffi-$(PYTHON_CFFI_VERSION).tar.gz
+PYTHON_CFFI_SITE = https://pypi.python.org/packages/source/c/cffi/
+PYTHON_CFFI_SETUP_TYPE = setuptools
+PYTHON_CFFI_DEPENDENCIES = host-pkgconf libffi
+PYTHON_CFFI_LICENSE = MIT
+PYTHON_CFFI_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))