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.
1 parent d8bc19e commit eab51fdCopy full SHA for eab51fd
dpctl/_init_helper.py
@@ -22,6 +22,8 @@
22
# with DPC++ libraries to the DLL search path gh-1745
23
if "VIRTUAL_ENV" in os.environ:
24
venv_dir = os.environ["VIRTUAL_ENV"]
25
- expected_dir = os.path.join(venv_dir, "Library", "bin")
26
- if os.path.exists(expected_dir):
27
- os.add_dll_directory(expected_dir)
+ # Expect to find file per PEP-0405
+ expected_file = os.path.join(venv_dir, "pyvenv.cfg")
+ dll_dir = os.path.join(venv_dir, "Library", "bin")
28
+ if os.path.isdir(dll_dir) and os.path.isfile(expected_file):
29
+ os.add_dll_directory(dll_dir)
0 commit comments