aboutsummaryrefslogtreecommitdiff
path: root/examples/python2.7/debian/python-config.1
diff options
context:
space:
mode:
Diffstat (limited to 'examples/python2.7/debian/python-config.1')
-rw-r--r--examples/python2.7/debian/python-config.190
1 files changed, 90 insertions, 0 deletions
diff --git a/examples/python2.7/debian/python-config.1 b/examples/python2.7/debian/python-config.1
new file mode 100644
index 0000000..542f404
--- /dev/null
+++ b/examples/python2.7/debian/python-config.1
@@ -0,0 +1,90 @@
+.TH PYTHON\-CONFIG 1 "November 27, 2011"
+.SH NAME
+python\-config \- output build options for python C/C++ extensions or embedding
+.SH SYNOPSIS
+.BI "python\-config"
+[
+.BI "\-\-prefix"
+]
+[
+.BI "\-\-exec\-prefix"
+]
+[
+.BI "\-\-includes"
+]
+[
+.BI "\-\-libs"
+]
+[
+.BI "\-\-cflags"
+]
+[
+.BI "\-\-ldflags"
+]
+[
+.BI "\-\-help"
+]
+.SH DESCRIPTION
+.B python\-config
+helps compiling and linking programs, which embed the Python interpreter, or
+extension modules that can be loaded dynamically (at run time) into
+the interpreter.
+.SH OPTIONS
+.TP
+.BI "\-\-cflags"
+print the C compiler flags.
+.TP
+.BI "\-\-ldflags"
+print the flags that should be passed to the linker.
+.TP
+.BI "\-\-includes"
+similar to \fI\-\-cflags\fP but only with \-I options (path to python header files).
+.TP
+.BI "\-\-libs"
+similar to \fI\-\-ldflags\fP but only with \-l options (used libraries).
+.TP
+.BI "\-\-prefix"
+prints the prefix (base directory) under which python can be found.
+.TP
+.BI "\-\-exec\-prefix"
+print the prefix used for executable program directories (such as bin, sbin, etc).
+.TP
+.BI "\-\-help"
+print the usage message.
+.PP
+
+.SH EXAMPLES
+To build the singe\-file c program \fIprog\fP against the python library, use
+.PP
+.RS
+gcc $(python\-config \-\-cflags \-\-ldflags) progr.cpp \-o progr.cpp
+.RE
+.PP
+The same in a makefile:
+.PP
+.RS
+CFLAGS+=$(shell python\-config \-\-cflags)
+.RE
+.RS
+LDFLAGS+=$(shell python\-config \-\-ldflags)
+.RE
+.RS
+all: progr
+.RE
+
+To build a dynamically loadable python module, use
+.PP
+.RS
+gcc $(python\-config \-\-cflags \-\-ldflags) \-shared \-fPIC progr.cpp \-o progr.so
+.RE
+
+.SH "SEE ALSO"
+python (1)
+.br
+http://docs.python.org/extending/extending.html
+.br
+/usr/share/doc/python/faq/extending.html
+
+.SH AUTHORS
+This manual page was written by Johann Felix Soden <johfel@gmx.de>
+for the Debian project (and may be used by others).