gh-140041: Fix import of ctypes on Android and Cygwin when ABI flags are present#140178
gh-140041: Fix import of ctypes on Android and Cygwin when ABI flags are present#140178freakboy3742 merged 2 commits intopython:mainfrom
ctypes on Android and Cygwin when ABI flags are present#140178Conversation
freakboy3742
left a comment
There was a problem hiding this comment.
Makes sense; thanks for the fix!
|
Thanks @mhsmith for the PR, and @freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
…I flags are present (pythonGH-140178) Use sysconfig to determine the full name of libpython, rather than hardcoding a library name that doesn't have ABI flags. (cherry picked from commit 7f371ed) Co-authored-by: Malcolm Smith <[email protected]>
…I flags are present (pythonGH-140178) Use sysconfig to determine the full name of libpython, rather than hardcoding a library name that doesn't have ABI flags. (cherry picked from commit 7f371ed) Co-authored-by: Malcolm Smith <[email protected]>
|
GH-140180 is a backport of this pull request to the 3.14 branch. |
|
GH-140181 is a backport of this pull request to the 3.13 branch. |
…BI flags are present (GH-140178) (#140181) Use sysconfig to determine the full name of libpython, rather than hardcoding a library name that doesn't have ABI flags. (cherry picked from commit 7f371ed) Co-authored-by: Malcolm Smith <[email protected]>
…BI flags are present (GH-140178) (#140180) Use sysconfig to determine the full name of libpython, rather than hardcoding a library name that doesn't have ABI flags. (cherry picked from commit 7f371ed) Co-authored-by: Malcolm Smith <[email protected]>
|
|
|
|
|
|
…I flags are present (python#140178) Use sysconfig to determine the full name of libpython, rather than hardcoding a library name that doesn't have ABI flags.
| elif _sys.platform in ["android", "cygwin"]: | ||
| # These are Unix-like platforms which use a dynamically-linked libpython. | ||
| pythonapi = PyDLL(_sysconfig.get_config_var("LDLIBRARY")) |
There was a problem hiding this comment.
fyi, on cygwin the DLL is DLLLIBRARY while LDLIBRARY is the import library, which wont work, see
Lines 1407 to 1414 in a882ae1
Uh oh!
There was an error while loading. Please reload this page.