aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pywarpx/__init__.py')
-rw-r--r--Python/pywarpx/__init__.py28
1 files changed, 26 insertions, 2 deletions
diff --git a/Python/pywarpx/__init__.py b/Python/pywarpx/__init__.py
index c74405acf..f0f4177d4 100644
--- a/Python/pywarpx/__init__.py
+++ b/Python/pywarpx/__init__.py
@@ -1,9 +1,27 @@
-# Copyright 2016-2022 Andrew Myers, David Grote, Lorenzo Giacomel
+# Copyright 2016-2023 The WarpX Community
#
# This file is part of WarpX.
#
+# Authors: Andrew Myers, David Grote, Lorenzo Giacomel, Axel Huebl
# License: BSD-3-Clause-LBNL
+import os
+
+# Python 3.8+ on Windows: DLL search paths for dependent
+# shared libraries
+# Refs.:
+# - https://github.com/python/cpython/issues/80266
+# - https://docs.python.org/3.8/library/os.html#os.add_dll_directory
+if os.name == "nt":
+ # add anything in the current directory
+ pwd = __file__.rsplit(os.sep, 1)[0] + os.sep
+ os.add_dll_directory(pwd)
+ # add anything in PATH
+ paths = os.environ.get("PATH", "")
+ for p in paths.split(";"):
+ if os.path.exists(p):
+ os.add_dll_directory(p)
+
from .Algo import algo
from .Amr import amr
from .Amrex import amrex
@@ -21,5 +39,11 @@ from .Particles import newspecies, particles
from .WarpX import warpx
from ._libwarpx import libwarpx
-# This is a circulor import and must happen after the import of libwarpx
+# This is a circular import and must happen after the import of libwarpx
from . import picmi # isort:skip
+
+# TODO
+#__version__ = cxx.__version__
+#__doc__ = cxx.__doc__
+#__license__ = cxx.__license__
+#__author__ = cxx.__author__