[Python-checkins] gh-93358: Fix python-config docs for how to embed Python (GH-98649)
miss-islington
webhook-mailer at python.org
Sat Oct 29 14:55:06 EDT 2022
https://github.com/python/cpython/commit/f8fb0d8e77a0ed765170595a48ff058711eb7fd8
commit: f8fb0d8e77a0ed765170595a48ff058711eb7fd8
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-10-29T11:55:01-07:00
summary:
gh-93358: Fix python-config docs for how to embed Python (GH-98649)
(cherry picked from commit e063c23c65143a3afae3e201459dc0d52cb6fc96)
Co-authored-by: Erlend E. Aasland <erlend.aasland at protonmail.com>
files:
M Doc/extending/embedding.rst
diff --git a/Doc/extending/embedding.rst b/Doc/extending/embedding.rst
index 5f5abdf9c150..e64db3733440 100644
--- a/Doc/extending/embedding.rst
+++ b/Doc/extending/embedding.rst
@@ -298,16 +298,16 @@ be directly useful to you:
.. code-block:: shell-session
- $ /opt/bin/python3.4-config --cflags
- -I/opt/include/python3.4m -I/opt/include/python3.4m -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
+ $ /opt/bin/python3.11-config --cflags
+ -I/opt/include/python3.11 -I/opt/include/python3.11 -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall
-* ``pythonX.Y-config --ldflags`` will give you the recommended flags when
- linking:
+* ``pythonX.Y-config --ldflags --embed`` will give you the recommended flags
+ when linking:
.. code-block:: shell-session
- $ /opt/bin/python3.4-config --ldflags
- -L/opt/lib/python3.4/config-3.4m -lpthread -ldl -lutil -lm -lpython3.4m -Xlinker -export-dynamic
+ $ /opt/bin/python3.11-config --ldflags --embed
+ -L/opt/lib/python3.11/config-3.11-x86_64-linux-gnu -L/opt/lib -lpython3.11 -lpthread -ldl -lutil -lm
.. note::
To avoid confusion between several Python installations (and especially
More information about the Python-checkins
mailing list