-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Takahiro Morishita
committed
Apr 17, 2022
1 parent
c645002
commit 51e0d77
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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__)) | ||
|