diff --git a/FESTIM/__init__.py b/FESTIM/__init__.py index faaab9477..bfe1a9255 100644 --- a/FESTIM/__init__.py +++ b/FESTIM/__init__.py @@ -1,3 +1,18 @@ +try: + # Python 3.8+ + from importlib import metadata +except ImportError: + try: + import importlib_metadata as metadata + except ImportError: + __version__ = "unknown" + +try: + __version__ = metadata.version("FESTIM") +except Exception: + __version__ = "unknown" + + import sympy as sp x, y, z, t = sp.symbols("x[0] x[1] x[2] t")