-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-140041: Fix import of ctypes on Android and Cygwin when ABI flags are present
#140178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
freakboy3742
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi, on cygwin the DLL is DLLLIBRARY while LDLIBRARY is the import library, which wont work, see
Lines 1407 to 1414 in a882ae1
| # LDLIBRARY is the name of the library to link against (as opposed to the | |
| # name of the library into which to insert object files). BLDLIBRARY is also | |
| # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY | |
| # is blank as the main program is not linked directly against LDLIBRARY. | |
| # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On | |
| # systems without shared libraries, LDLIBRARY is the same as LIBRARY | |
| # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, | |
| # DLLLIBRARY is the shared (i.e., DLL) library. |
Uh oh!
There was an error while loading. Please reload this page.