From 8a2c70cf28515c791cc2f2ba200a0d99fc30c924 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Fri, 24 May 2013 09:24:07 +0200 Subject: [PATCH] Document cythonize accepts Extension arguments. --- docs/src/reference/compilation.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/src/reference/compilation.rst b/docs/src/reference/compilation.rst index db1251c..93c324a 100644 --- a/docs/src/reference/compilation.rst +++ b/docs/src/reference/compilation.rst @@ -67,6 +67,25 @@ The ``cythonize`` command also allows for multi-threaded compilation and dependency resolution. Recompilation will be skipped if the target file is up to date with its main source file and dependencies. +Under the hood ``cythonize`` creates a list of distutils ``Extension`` +instances. Any extra arguments you pass to ``cythonize`` will be +passed to ``Extension``. This is useful if you need to add extra include or +library paths. + +:: + + from distutils.core import setup + from Cython.Build import cythonize + + setup( + name = "My hello app", + ext_modules = cythonize('src/*.pyx', + include_dirs = [...], + library_dirs = [...], + ), + ), + ) + Compiling with ``pyximport`` ============================= -- 2.7.4