3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-28 05:29:25 +01:00

launcher: show VCS version in "pylink -v"

(cherry picked from commit a04bf6119e)
This commit is contained in:
James Lu 2016-08-23 07:28:48 -07:00
parent 441f2244a9
commit 3e2c6ea1b7

4
pylink
View File

@ -13,7 +13,7 @@ except ImportError:
"setup.py install' (global install) or 'python3 setup.py install --user'" "setup.py install' (global install) or 'python3 setup.py install --user'"
" (local install)\n") " (local install)\n")
sys.exit(1) sys.exit(1)
from pylinkirc import conf, __version__ from pylinkirc import conf, __version__, real_version
if __name__ == '__main__': if __name__ == '__main__':
import argparse import argparse
@ -25,7 +25,7 @@ if __name__ == '__main__':
args = parser.parse_args() args = parser.parse_args()
if args.version: # Display version and exit if args.version: # Display version and exit
print('PyLink ' + __version__) print('PyLink %s (in VCS: %s)' % (__version__, real_version))
sys.exit() sys.exit()
# Load the config # Load the config