diff --git a/CHANGELOG.md b/CHANGELOG.md index eb31d3cd325..5f3edc23d96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Replaced `ci` section in `.pre-commit-config.yaml` with a new GitHub workflow with scheduled run to autoupdate the `pre-commit` configuration [#2542](https://github.com/IntelPython/dpnp/pull/2542) * FFT module is updated to perform in-place FFT in intermediate steps of ND FFT [#2543](https://github.com/IntelPython/dpnp/pull/2543) * Reused dpctl tensor include to enable experimental SYCL namespace for complex types [#2546](https://github.com/IntelPython/dpnp/pull/2546) +* Changed Windows-specific logic in dpnp initialization [#2553](https://github.com/IntelPython/dpnp/pull/2553) ### Deprecated diff --git a/dpnp/__init__.py b/dpnp/__init__.py index 170b73b76cc..744200ca13f 100644 --- a/dpnp/__init__.py +++ b/dpnp/__init__.py @@ -40,17 +40,13 @@ # where to search for DLLs towards both DPNP backend and DPCTL Sycl interface, # otherwise DPNP import will be failing. This is because the libraries # are not installed under any of default paths where Python is searching. -from platform import system - -if system() == "Windows": # pragma: no cover - if hasattr(os, "add_dll_directory"): - os.add_dll_directory(mypath) - os.add_dll_directory(dpctlpath) +if sys.platform == "win32": # pragma: no cover + os.add_dll_directory(mypath) + os.add_dll_directory(dpctlpath) os.environ["PATH"] = os.pathsep.join( [os.getenv("PATH", ""), mypath, dpctlpath] ) - # For virtual environments on Windows, add folder with DPC++ libraries # to the DLL search path if sys.base_exec_prefix != sys.exec_prefix and os.path.isfile(