We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bcd708 commit ee3503bCopy full SHA for ee3503b
1 file changed
pythonnet/find_libpython/__init__.py
@@ -91,6 +91,11 @@ def _linked_libpython_unix():
91
if retcode == 0: # means error
92
return None
93
path = os.path.realpath(dlinfo.dli_fname.decode())
94
+
95
+ # Compare basenames only, this should always be enough except for very
96
+ # pathological cases
97
+ if os.path.basename(path) == os.path.basename(os.path.realpath(sys.executable)):
98
+ return None
99
return path
100
101
0 commit comments