Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Takahiro Morishita committed Apr 17, 2022
1 parent c645002 commit 51e0d77
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions bbpn/__init__.py
Original file line number Diff line number Diff line change
@@ -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__ = '[email protected]'
__credits__ = 'IPAC'

package = 'bbpn'

print('Welcome to %s version %s'%(package,__version__))

0 comments on commit 51e0d77

Please sign in to comment.