summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-05-12 21:06:41 (GMT)
committerGeorg Brandl <georg@python.org>2007-05-12 21:06:41 (GMT)
commit2dd7d179de835f9e93bc46aaef25636294f1c13b (patch)
treea4139e8876056309a6bcdfa36842cae5875dc1af /Doc
parenta74b67e15e19e2ba95e66e5a9ac233b4e1f79d68 (diff)
downloadcpython-2dd7d179de835f9e93bc46aaef25636294f1c13b.zip
cpython-2dd7d179de835f9e93bc46aaef25636294f1c13b.tar.gz
cpython-2dd7d179de835f9e93bc46aaef25636294f1c13b.tar.bz2
Bug #1046945: document SWIG options of distutils.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/dist/dist.tex22
1 files changed, 19 insertions, 3 deletions
diff --git a/Doc/dist/dist.tex b/Doc/dist/dist.tex
index 928b642..ff5106a 100644
--- a/Doc/dist/dist.tex
+++ b/Doc/dist/dist.tex
@@ -486,9 +486,24 @@ list; the \command{build\_ext} command knows how to deal with SWIG
extensions: it will run SWIG on the interface file and compile the
resulting C/\Cpp{} file into your extension.
-\XXX{SWIG support is rough around the edges and largely untested;
- especially SWIG support for \Cpp{} extensions! Explain in more detail
- here when the interface firms up.}
+\XXX{SWIG support is rough around the edges and largely untested!}
+
+This warning notwithstanding, options to SWIG can be currently passed
+like this:
+
+\begin{verbatim}
+setup(...
+ ext_modules=[Extension('_foo', ['foo.i'],
+ swig_opts=['-modern', '-I../include'])],
+ py_modules=['foo'],
+ )
+\end{verbatim}
+
+Or on the commandline like this:
+
+\begin{verbatim}
+> python setup.py build_ext --swig-opts="-modern -I../include"
+\end{verbatim}
On some platforms, you can include non-source files that are processed
by the compiler and included in your extension. Currently, this just
@@ -1017,6 +1032,7 @@ Options for 'build_ext' command:
--include-dirs (-I) list of directories to search for header files
--define (-D) C preprocessor macros to define
--undef (-U) C preprocessor macros to undefine
+ --swig-opts list of SWIG command line options
[...]
\end{verbatim}