aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/_libwarpx.py
diff options
context:
space:
mode:
authorGravatar Axel Huebl <axel.huebl@plasma.ninja> 2021-02-18 11:38:11 -0800
committerGravatar GitHub <noreply@github.com> 2021-02-18 11:38:11 -0800
commit2e5cf0857df056c8be7b73e8cb17fe227b272785 (patch)
tree577fa705dec27427cc5fa2808440bee190d1efc1 /Python/pywarpx/_libwarpx.py
parent85b55bae22da4d26474fce172988c53022592371 (diff)
downloadWarpX-2e5cf0857df056c8be7b73e8cb17fe227b272785.tar.gz
WarpX-2e5cf0857df056c8be7b73e8cb17fe227b272785.tar.zst
WarpX-2e5cf0857df056c8be7b73e8cb17fe227b272785.zip
Add "." to libwarpx Aliases (#1720)
* Add "." to libwarpx Aliases Add a "." to the suffix of the short-hand `libwarpx.<DIM>.<so|dll>` libs. This unifies the suffix with the structure in executables and makes it easier to find a "long" version of the library (not in this PR). Also fixes the suffix naming on Windows to ".dll", since this is a true C/C++ library, not a Python module (aka not a shared library following Python entry points and conventions). * CMake: Add library alias in install Also add the expected library alias in CMake install prefixes.
Diffstat (limited to 'Python/pywarpx/_libwarpx.py')
-rwxr-xr-xPython/pywarpx/_libwarpx.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Python/pywarpx/_libwarpx.py b/Python/pywarpx/_libwarpx.py
index f8f57bd85..7092e20ec 100755
--- a/Python/pywarpx/_libwarpx.py
+++ b/Python/pywarpx/_libwarpx.py
@@ -59,13 +59,12 @@ else:
_libc = ctypes.CDLL(_find_library('c'))
-# macOS/Linux use .so, Windows uses .pyd
-# https://docs.python.org/3/faq/windows.html#is-a-pyd-file-the-same-as-a-dll
+# this is a plain C/C++ shared library, not a Python module
if os.name == 'nt':
- mod_ext = "pyd"
+ mod_ext = "dll"
else:
mod_ext = "so"
-libname = "libwarpx{0}.{1}".format(geometry_dim, mod_ext)
+libname = "libwarpx.{0}.{1}".format(geometry_dim, mod_ext)
try:
libwarpx = ctypes.CDLL(os.path.join(_get_package_root(), libname))