Skip to content

Commit

Permalink
Only add bin/ to DLL paths when exists
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreinking committed Sep 4, 2024
1 parent 75bf306 commit 8a977d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python_bindings/src/halide/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ def patch_dll_dirs():
import os
if hasattr(os, 'add_dll_directory'):
from pathlib import Path
os.add_dll_directory(str(Path(__file__).parent / 'bin'))
bin_dir = Path(__file__).parent / 'bin'
if bin_dir.exists():
os.add_dll_directory(str(bin_dir))


patch_dll_dirs()
Expand Down

0 comments on commit 8a977d8

Please sign in to comment.