Skip to contentSkip to conversation

docs/manual: add "python-package CFFI backend" section

PATCH New yegorslists at googlemail.com 3 participants 3 messages Feb 24, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 docs/manual: add "python-package CFFI backend" section

From: Yegor Yefremov <[email protected]>

---
Changes:
v2: resolve grammatical issues suggested by Arnout Vandecappelle

 docs/manual/adding-packages-python.txt | 37 ++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
docs/manual/adding-packages-python.txt +37 -0
index 588dbf8..656b289 100644
@@ -160,3 +160,40 @@ possible to customize what is done in any particular step:
   +PYTHON_FOO_BUILD_CMDS+ variable, it will be used instead of the
   default Python one. However, using this method should be restricted
   to very specific cases. Do not use it in the general case.
+
+[[python-package-cffi-backend]]
+
+==== +python-package+ CFFI backend
+
+C Foreign Function Interface for Python (CFFI) provides a convenient and
+reliable way to call compiled C code from Python using interface declarations
+written in C. Python packages relying on this backend can be identified by
+appearance of the +cffi+ dependency in an +install_requires+ field of their
++setup.py+ file.
+
+Such a package needs +python-cffi+ as a runtime dependency in order to import
+the compiled C library wrapper on the target and +host-python-cffi+ as a
+build-time dependency in order to cross-compile the C wrapper. You'll need to
+add the following code to the package's +Config.in+ and +*.mk+ files,
+respectively.
+
+
+------------------------
+config BR2_PACKAGE_PYTHON_FOO
+        bool "python-foo"
+        select BR2_PACKAGE_PYTHON_CFFI # runtime
+------------------------
+
+------------------------
+################################################################################
+#
+# python-foo
+#
+################################################################################
+
+...
+
+PYTHON_FOO_DEPENDENCIES = host-python-cffi
+
+$(eval $(python-package))
+------------------------
Signature · 1 line
2.7.0
#1 lore raw

PATCH v2 1/1 docs/manual: add "python-package CFFI backend" section

Hello,

Quoted 3 lines · yegorslists at googlemail.com

From: Yegor Yefremov <[email protected]>

Hum, I already applied the v1 of your patch, with some minor changes. Did I forget to send the e-mail notification?

See:

https://git.busybox.net/buildroot/commit/?h=next&id=0e5c9c2b35c71a3d3180c5829975dba5222b30c9

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 docs/manual: add "python-package CFFI backend" section

Quoted 9 lines · Thomas Petazzoni

Hello,

Quoted 3 lines · yegorslists at googlemail.com

From: Yegor Yefremov <[email protected]>

Hum, I already applied the v1 of your patch, with some minor changes. Did I forget to send the e-mail notification?

You did, that's why I still replied to the v1 after you committed it (I know,
FIFO mail handling is dangerous :-)

Regards,
Arnout

Quoted 9 lines

See:

https://git.busybox.net/buildroot/commit/?h=next&id=0e5c9c2b35c71a3d3180c5829975dba5222b30c9

Best regards,

Thomas

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF