1
.TH PYTHON\-CONFIG 1 "November 27, 2011"
3
python\-config \- output build options for python C/C++ extensions or embedding
10
.BI "\-\-exec\-prefix"
25
.BI "\-\-extension\-suffix"
35
helps compiling and linking programs, which embed the Python interpreter, or
36
extension modules that can be loaded dynamically (at run time) into
41
print the the ABI flags as specified by PEP 3149.
44
print the C compiler flags.
47
print the flags that should be passed to the linker.
50
similar to \fI\-\-cflags\fP but only with \-I options (path to python header files).
53
similar to \fI\-\-ldflags\fP but only with \-l options (used libraries).
56
prints the prefix (base directory) under which python can be found.
58
.BI "\-\-exec\-prefix"
59
print the prefix used for executable program directories (such as bin, sbin, etc).
61
.BI "\-\-extension\-suffix"
62
print the extension suffix used for binary extensions.
65
print the usage message.
69
To build the singe\-file c program \fIprog\fP against the python library, use
72
gcc $(python\-config \-\-cflags \-\-ldflags) progr.cpp \-o progr.cpp
75
The same in a makefile:
78
CFLAGS+=$(shell python\-config \-\-cflags)
81
LDFLAGS+=$(shell python\-config \-\-ldflags)
87
To build a dynamically loadable python module, use
90
gcc $(python\-config \-\-cflags \-\-ldflags) \-shared \-fPIC progr.cpp \-o progr.so
96
http://docs.python.org/extending/extending.html
98
/usr/share/doc/python/faq/extending.html
101
This manual page was written by Johann Felix Soden <johfel@gmx.de>
102
for the Debian project (and may be used by others).