Repository navigation
gh-104612: Document linking embedders for several Python versions - #162498
Conversation
Add a section to the embedding guide that explains, for Linux, that linking with `pythonX.Y-config --ldflags --embed` ties an application to one minor version even when it only uses the Limited API, and how a single binary can instead load `libpython3.so` at run time. Mention renaming the dependency with `patchelf` as a packaging workaround, and list the limitations of both approaches. Related discussion: https://discuss.python.org/t/on-embedders-and-stable-abi/110197
Documentation build overview
24 files changed ·
|
zooba
left a comment
There was a problem hiding this comment.
Great! Well written, easy to follow, it's the kind of addition I've been meaning to make for Windows for years now 😄
Left a few comments to help the flow and clarity, but don't rely on me for strict correctness. I've done all of these things before, but I didn't reference my earlier work to check, and I don't do them often enough on Linux to remember the details.
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
Thanks @itamaro for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
|
Sorry, @itamaro, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
GH-162760 is a backport of this pull request to the 3.15 branch. |
|
GH-162761 is a backport of this pull request to the 3.14 branch. |
…ons (GH-162498) (#162760) gh-104612: Document linking embedders for several Python versions (GH-162498) Add a section to the embedding guide that explains, for Linux, that linking with `pythonX.Y-config --ldflags --embed` ties an application to one minor version even when it only uses the Limited API, and how a single binary can instead load `libpython3.so` at run time. Mention renaming the dependency with `patchelf` as a packaging workaround, and list the limitations of both approaches. Related discussion: https://discuss.python.org/t/on-embedders-and-stable-abi/110197 (cherry picked from commit cb9d78f) Co-authored-by: Itamar Oren <itamarost@gmail.com>
…ons (GH-162498) (#162761) Add a section to the embedding guide that explains, for Linux, that linking with `pythonX.Y-config --ldflags --embed` ties an application to one minor version even when it only uses the Limited API, and how a single binary can instead load `libpython3.so` at run time. Mention renaming the dependency with `patchelf` as a packaging workaround, and list the limitations of both approaches. Related discussion: https://discuss.python.org/t/on-embedders-and-stable-abi/110197 (cherry picked from commit cb9d78f) Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Add a section to the embedding guide that explains, for Linux, that linking with
pythonX.Y-config --ldflags --embedties an application to one minor version even when it only uses the Limited API, and how a single binary can instead loadlibpython3.soat run time. Mention renaming the dependency withpatchelfas a packaging workaround, and list the limitations of both approaches.Related discussion: https://discuss.python.org/t/on-embedders-and-stable-abi/110197