aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/_libwarpx.py
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pywarpx/_libwarpx.py')
-rwxr-xr-xPython/pywarpx/_libwarpx.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Python/pywarpx/_libwarpx.py b/Python/pywarpx/_libwarpx.py
index 592459132..615d9fd66 100755
--- a/Python/pywarpx/_libwarpx.py
+++ b/Python/pywarpx/_libwarpx.py
@@ -33,6 +33,9 @@ class LibWarpX():
self.initialized = False
atexit.register(self.finalize)
+ # set once libwarpx_so is loaded
+ self.__version__ = None
+
def __getattr__(self, attribute):
if attribute == 'libwarpx_so':
# If the 'libwarpx_so' is referenced, load it.
@@ -109,6 +112,8 @@ class LibWarpX():
except ImportError:
raise Exception(f"Dimensionality '{self.geometry_dim}' was not compiled in this Python install. Please recompile with -DWarpX_DIMS={_dims}")
+ self.__version__ = self.libwarpx_so.__version__
+
def getNProcs(self):
'''