Skip to content

Commit

Permalink
🏁 patch dll directory on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: burgholzer <[email protected]>
  • Loading branch information
burgholzer committed Jan 7, 2025
1 parent fd9ba73 commit 9a9c946
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/mqt/qcec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,23 @@

from __future__ import annotations

import sys

# under Windows, make sure to add the appropriate DLL directory to the PATH
if sys.platform == "win32":

def _dll_patch() -> None:
"""Add the DLL directory to the PATH."""
import os
import sysconfig
from pathlib import Path

bin_dir = Path(sysconfig.get_paths()["purelib"]) / "mqt" / "core" / "bin"
os.add_dll_directory(str(bin_dir))

_dll_patch()
del _dll_patch

from ._version import version as __version__
from .pyqcec import (
ApplicationScheme,
Expand Down

0 comments on commit 9a9c946

Please sign in to comment.