From 2de58d40ebf18e1e26261b70820649211f726a16 Mon Sep 17 00:00:00 2001 From: ogiorgis Date: Thu, 21 Dec 2023 14:48:38 +0100 Subject: [PATCH] [mesonpy] add _version file --- fluidsim/_version.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 fluidsim/_version.py diff --git a/fluidsim/_version.py b/fluidsim/_version.py new file mode 100644 index 00000000..33bb846a --- /dev/null +++ b/fluidsim/_version.py @@ -0,0 +1,30 @@ +import importlib_metadata + +__version__ = importlib_metadata.version(__package__) + + +__all__ = ["__version__", "get_local_version", "__about__"] + +try: + from pyfiglet import figlet_format + + __about__ = figlet_format("fluidsim", font="big") +except ImportError: + __about__ = r""" + __ _ _ _ _ + / _| | (_) | | (_) +| |_| |_ _ _ __| |___ _ _ __ ___ +| _| | | | | |/ _` / __| | '_ ` _ \ +| | | | |_| | | (_| \__ \ | | | | | | +|_| |_|\__,_|_|\__,_|___/_|_| |_| |_| +""" + +__about__ = __about__.rstrip() + f"\n\n{28 * ' '} v. {__version__}\n" + +_loc_version = None + + +def get_local_version(): + """Get a long "local" version.""" + + return __version__