Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Lib/ctypes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import os as _os
import sys as _sys
import sysconfig as _sysconfig
import types as _types

from _ctypes import Union, Structure, Array
Expand Down Expand Up @@ -550,7 +549,9 @@ def LoadLibrary(self, name):
pythonapi = PyDLL("python dll", None, _sys.dllhandle)
elif _sys.platform in ["android", "cygwin"]:
# These are Unix-like platforms which use a dynamically-linked libpython.
pythonapi = PyDLL(_sysconfig.get_config_var("LDLIBRARY"))
import sysconfig # delay import
pythonapi = PyDLL(sysconfig.get_config_var("LDLIBRARY"))
del sysconfig
else:
pythonapi = PyDLL(None)

Expand Down
Loading