Skip to content

Commit c071550

Browse files
committed
Cygwin: try LD_LIBRARY_PATH
1 parent c4ef660 commit c071550

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/packages/sharedlib-in-package/mypkg/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ def _enable_sharedlib_loading():
2727
os.add_dll_directory(basedir)
2828
elif sys.platform == "cygwin":
2929
basedir = os.path.dirname(__file__)
30-
os.environ["PATH"] = f"{os.environ['PATH']:s}:{basedir:s}"
30+
if 'LD_LIBRARY_PATH' in os.environ:
31+
os.environ["LD_LIBRARY_PATH"] = f"{os.environ['LD_LIBRARY_PATH']:s}:{basedir:s}"
32+
else:
33+
os.environ["LD_LIBRARY_PATH"] = f"{basedir:s}"
3134

3235

3336
_enable_sharedlib_loading()

0 commit comments

Comments
 (0)