From 51e0d77533683fffa318e5dc3cae680c9a80efb4 Mon Sep 17 00:00:00 2001 From: Takahiro Morishita Date: Sun, 17 Apr 2022 11:48:46 -0700 Subject: [PATCH] Update __init__.py --- bbpn/__init__.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/bbpn/__init__.py b/bbpn/__init__.py index e69de29..876ce75 100755 --- a/bbpn/__init__.py +++ b/bbpn/__init__.py @@ -0,0 +1,26 @@ +import re +import sys +import os +from pkg_resources import get_distribution, DistributionNotFound + +__version_commit__ = '' +_regex_git_hash = re.compile(r'.*\+g(\w+)') + +try: + __version__ = get_distribution(__name__).version +except DistributionNotFound: + __version__ = 'dev' + +if '+' in __version__: + commit = _regex_git_hash.match(__version__).groups() + if commit: + __version_commit__ = commit[0] + +__author__ = 'Takahiro Morishita' +__email__ = 'takahiro@ipac.caltech.edu' +__credits__ = 'IPAC' + +package = 'bbpn' + +print('Welcome to %s version %s'%(package,__version__)) +