We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
sysconfig
1 parent 94273d7 commit bfcbc3dCopy full SHA for bfcbc3d
Lib/ctypes/__init__.py
@@ -4,6 +4,8 @@
4
import sys as _sys
5
import types as _types
6
7
+lazy import sysconfig as _sysconfig
8
+
9
from _ctypes import Union, Structure, Array
10
from _ctypes import _Pointer
11
from _ctypes import CFuncPtr as _CFuncPtr
@@ -549,9 +551,7 @@ def LoadLibrary(self, name):
549
551
pythonapi = PyDLL("python dll", None, _sys.dllhandle)
550
552
elif _sys.platform in ["android", "cygwin"]:
553
# These are Unix-like platforms which use a dynamically-linked libpython.
- import sysconfig # delay import
- pythonapi = PyDLL(sysconfig.get_config_var("LDLIBRARY"))
554
- del sysconfig
+ pythonapi = PyDLL(_sysconfig.get_config_var("LDLIBRARY"))
555
else:
556
pythonapi = PyDLL(None)
557
0 commit comments