GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — bpo-36721: Add --embed option to python-config by vstinner · Pull Request #13500 · python/cpython Conversation
|
|
I tested with: Commands without Commands with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@hroncok @xdegaye: Would you mind to review (may also test?) this change? I marked https://bugs.python.org/issue36721 as a release blocker. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
cc @doko42 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
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".
|
I amended (and rebased) my commit to be able to update the commit to address @hroncok review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
As expected, all
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Just a nit-pick
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Yeah, it's the expected behavior. But I asked you to double check just in case :-) I'm not confident when I modify the build system. Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Should we try to implement the waf part before this is merged to see how possible it is? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Are you talking about the code to handle Python 3.8 and older version? The fallback described in the documentation should be trivial to implement, no? Why would it be not possible? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
It should be entirely possible. It was just an idea. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Even if I'm not confident in my change (add --embed option), I chose to merge it anyway since at least "waf" build system is broken by my other changes (no longer link C extensions to libpython). I would like to get this change into Python 3.8 beta1 to attempt to fix most applications embedding Python. Anyway, if something goes wrong, we still have plenty of time to decide what to do before 3.8.0 final, scheduled for 2019-10-21: https://www.python.org/dev/peps/pep-0569/ |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
This is what it gave me in Fedora, feels a bit inconsistent: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Should be fixed by PR #13551 :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.