aboutsummaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rwxr-xr-xPython/pywarpx/_libwarpx.py7
-rw-r--r--Python/setup.py4
2 files changed, 5 insertions, 6 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))
diff --git a/Python/setup.py b/Python/setup.py
index fe06d66f8..58f31b8bd 100644
--- a/Python/setup.py
+++ b/Python/setup.py
@@ -34,7 +34,7 @@ if args.with_libwarpx:
# GNUmake
if args.with_libwarpx not in allowed_dims:
print("WARNING: '%s' is not an allowed WarpX DIM" % args.with_libwarpx)
- package_data = {'pywarpx' : ['libwarpx%s.so' % args.with_libwarpx]}
+ package_data = {'pywarpx' : ['libwarpx.%s.so' % args.with_libwarpx]}
data_files = []
elif args.with_lib_dir or PYWARPX_LIB_DIR:
# CMake and Package Managers
@@ -42,7 +42,7 @@ elif args.with_lib_dir or PYWARPX_LIB_DIR:
lib_dir = args.with_lib_dir if args.with_lib_dir else PYWARPX_LIB_DIR
my_path = os.path.dirname(os.path.realpath(__file__))
for dim in allowed_dims:
- lib_name = 'libwarpx%s.so' % dim
+ lib_name = 'libwarpx.%s.so' % dim
lib_path = os.path.join(lib_dir, lib_name)
link_name = os.path.join(my_path, "pywarpx", lib_name)
if os.path.isfile(link_name):