diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-05-23 01:30:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-23 01:30:23 (GMT) |
commit | 0a8e57248b913851640c64375600f05157c997df (patch) | |
tree | 79352007eef8deb7530c38d460554183e6c960a2 /Misc/python.pc.in | |
parent | ef5bb25e2d6147cd44be9c9b166525fb30485be0 (diff) | |
download | cpython-0a8e57248b913851640c64375600f05157c997df.zip cpython-0a8e57248b913851640c64375600f05157c997df.tar.gz cpython-0a8e57248b913851640c64375600f05157c997df.tar.bz2 |
bpo-36721: Add --embed option to python-config (GH-13500)
To embed Python into an application, a new --embed option must be
passed to "python3-config --libs --embed" to get "-lpython3.8" (link
the application to libpython). To support both 3.8 and older, try
"python3-config --libs --embed" first and fallback to "python3-config
--libs" (without --embed) if the previous command fails.
Add a pkg-config "python-3.8-embed" module to embed Python into an
application: "pkg-config python-3.8-embed --libs" includes
"-lpython3.8". To support both 3.8 and older, try "pkg-config
python-X.Y-embed --libs" first and fallback to "pkg-config python-X.Y
--libs" (without --embed) if the previous command fails (replace
"X.Y" with the Python version).
On the other hand, "pkg-config python3.8 --libs" no longer contains
"-lpython3.8". C extensions must not be linked to libpython (except
on Android, case handled by the script); this change is backward
incompatible on purpose.
"make install" now also installs "python-3.8-embed.pc".
Diffstat (limited to 'Misc/python.pc.in')
-rw-r--r-- | Misc/python.pc.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Misc/python.pc.in b/Misc/python.pc.in index ae69867..87e04de 100644 --- a/Misc/python.pc.in +++ b/Misc/python.pc.in @@ -5,9 +5,9 @@ libdir=@libdir@ includedir=@includedir@ Name: Python -Description: Python library -Requires: +Description: Build a C extension for Python +Requires: Version: @VERSION@ Libs.private: @LIBS@ -Libs: -L${libdir} -lpython@VERSION@@ABIFLAGS@ +Libs: Cflags: -I${includedir}/python@VERSION@@ABIFLAGS@ |