From 61c08f7435570783f5c267e42d288d31bf77e560 Mon Sep 17 00:00:00 2001 From: Ben McGinnes Date: Sun, 16 Sep 2018 13:48:12 +1000 Subject: docs: python bindings howto * Added new advanced section with an example of using the Python bindings with CPython code compiled back to C code using Cython. * Though it may seem a bit counter-intuitive to use the bindings just to go back to C via a different route, this is not actually stupid. * Added examples/howto/advanced/cython/ directory. * Added keycount.pyx, setup.py and the keycount.c file which the first two generated with Cython. Not including the .so and .o files from the build. * Exported the .texi version of the howto for the main docs. --- lang/python/examples/howto/advanced/cython/setup.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 lang/python/examples/howto/advanced/cython/setup.py (limited to 'lang/python/examples/howto/advanced/cython/setup.py') diff --git a/lang/python/examples/howto/advanced/cython/setup.py b/lang/python/examples/howto/advanced/cython/setup.py new file mode 100644 index 00000000..0d0be01e --- /dev/null +++ b/lang/python/examples/howto/advanced/cython/setup.py @@ -0,0 +1,6 @@ +from distutils.core import setup +from Cython.Build import cythonize + +setup( + ext_modules = cythonize("keycount.pyx") +) -- cgit v1.2.3