| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -77,6 +77,9 @@ class Dl_info(ctypes.Structure): | |||
| 77 | 77 | ||
| 78 | 78 | ||
| 79 | 79 | def _linked_libpython_unix(): | |
| 80 | + if not sysconfig.get_config_var("Py_ENABLE_SHARED"): | ||
| 81 | + return None | ||
| 82 | + | ||
| 80 | 83 | libdl = ctypes.CDLL(ctypes.util.find_library("dl")) | |
| 81 | 84 | libdl.dladdr.argtypes = [ctypes.c_void_p, ctypes.POINTER(Dl_info)] | |
| 82 | 85 | libdl.dladdr.restype = ctypes.c_int | |
@@ -88,8 +91,6 @@ def _linked_libpython_unix(): | |||
| 88 | 91 | if retcode == 0: # means error | |
| 89 | 92 | return None | |
| 90 | 93 | path = os.path.realpath(dlinfo.dli_fname.decode()) | |
| 91 | - if path == os.path.realpath(sys.executable): | ||
| 92 | - return None | ||
| 93 | 94 | return path | |
| 94 | 95 | ||
| 95 | 96 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments