178 lines
3.3 KiB
HTML
178 lines
3.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of PYTHON-CONFIG</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>PYTHON-CONFIG</H1>
|
|
Section: User Commands (1)<BR>Updated: November 27, 2011<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
python-config - output build options for python C/C++ extensions or embedding
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>python-config</B>
|
|
|
|
[
|
|
<B>--prefix</B>
|
|
|
|
]
|
|
[
|
|
<B>--exec-prefix</B>
|
|
|
|
]
|
|
[
|
|
<B>--includes</B>
|
|
|
|
]
|
|
[
|
|
<B>--libs</B>
|
|
|
|
]
|
|
[
|
|
<B>--cflags</B>
|
|
|
|
]
|
|
[
|
|
<B>--ldflags</B>
|
|
|
|
]
|
|
[
|
|
<B>--extension-suffix</B>
|
|
|
|
]
|
|
[
|
|
<B>--abiflags</B>
|
|
|
|
]
|
|
[
|
|
<B>--help</B>
|
|
|
|
]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>python-config</B>
|
|
|
|
helps compiling and linking programs, which embed the Python interpreter, or
|
|
extension modules that can be loaded dynamically (at run time) into
|
|
the interpreter.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>--abiflags</B>
|
|
|
|
<DD>
|
|
print the the ABI flags as specified by PEP 3149.
|
|
<DT id="2"><B>--cflags</B>
|
|
|
|
<DD>
|
|
print the C compiler flags.
|
|
<DT id="3"><B>--ldflags</B>
|
|
|
|
<DD>
|
|
print the flags that should be passed to the linker.
|
|
<DT id="4"><B>--includes</B>
|
|
|
|
<DD>
|
|
similar to <I>--cflags</I> but only with -I options (path to python header files).
|
|
<DT id="5"><B>--libs</B>
|
|
|
|
<DD>
|
|
similar to <I>--ldflags</I> but only with -l options (used libraries).
|
|
<DT id="6"><B>--prefix</B>
|
|
|
|
<DD>
|
|
prints the prefix (base directory) under which python can be found.
|
|
<DT id="7"><B>--exec-prefix</B>
|
|
|
|
<DD>
|
|
print the prefix used for executable program directories (such as bin, sbin, etc).
|
|
<DT id="8"><B>--extension-suffix</B>
|
|
|
|
<DD>
|
|
print the extension suffix used for binary extensions.
|
|
<DT id="9"><B>--help</B>
|
|
|
|
<DD>
|
|
print the usage message.
|
|
</DL>
|
|
<P>
|
|
|
|
<P>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
To build the singe-file c program <I>prog</I> against the python library, use
|
|
<P>
|
|
|
|
<DL COMPACT><DT id="10"><DD>
|
|
gcc $(python-config --cflags --ldflags) progr.cpp -o progr.cpp
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
The same in a makefile:
|
|
<P>
|
|
|
|
<DL COMPACT><DT id="11"><DD>
|
|
CFLAGS+=$(shell python-config --cflags)
|
|
</DL>
|
|
|
|
<DL COMPACT><DT id="12"><DD>
|
|
LDFLAGS+=$(shell python-config --ldflags)
|
|
</DL>
|
|
|
|
<DL COMPACT><DT id="13"><DD>
|
|
all: progr
|
|
</DL>
|
|
|
|
<P>
|
|
To build a dynamically loadable python module, use
|
|
<P>
|
|
|
|
<DL COMPACT><DT id="14"><DD>
|
|
gcc $(python-config --cflags --ldflags) -shared -fPIC progr.cpp -o progr.so
|
|
</DL>
|
|
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
python (1)
|
|
<BR>
|
|
|
|
<A HREF="http://docs.python.org/extending/extending.html">http://docs.python.org/extending/extending.html</A>
|
|
<BR>
|
|
|
|
/usr/share/doc/python/faq/extending.html
|
|
<P>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AUTHORS</H2>
|
|
|
|
This manual page was written by Johann Felix Soden <<A HREF="mailto:johfel@gmx.de">johfel@gmx.de</A>>
|
|
for the Debian project (and may be used by others).
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="15"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="16"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="17"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="18"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="19"><A HREF="#lbAF">EXAMPLES</A><DD>
|
|
<DT id="20"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
<DT id="21"><A HREF="#lbAH">AUTHORS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:29 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|