Updated systemInfo() to read from .bzr if needed
This commit is contained in:
parent
ad7b5f0aad
commit
0953741671
11
__init__.py
11
__init__.py
@ -1,5 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
REVISION = '621'
|
||||
REVISION = None
|
||||
|
||||
### import all the goodies and add some helper functions for easy CLI use
|
||||
|
||||
@ -11,7 +11,7 @@ from .Qt import QtGui
|
||||
#if QtGui.QApplication.instance() is None:
|
||||
#app = QtGui.QApplication([])
|
||||
|
||||
import sys
|
||||
import os, sys
|
||||
|
||||
## check python version
|
||||
if sys.version_info[0] < 2 or (sys.version_info[0] == 2 and sys.version_info[1] != 7):
|
||||
@ -53,6 +53,13 @@ def systemInfo():
|
||||
print "sys.version:", sys.version
|
||||
from .Qt import VERSION_INFO
|
||||
print "qt bindings:", VERSION_INFO
|
||||
|
||||
global REVISION
|
||||
if REVISION is None: ## this code was probably checked out from bzr; look up the last-revision file
|
||||
lastRevFile = os.path.join(os.path.dirname(__file__), '.bzr', 'branch', 'last-revision')
|
||||
if os.path.exists(lastRevFile):
|
||||
REVISION = open(lastRevFile, 'r').read().strip()
|
||||
|
||||
print "pyqtgraph:", REVISION
|
||||
print "config:"
|
||||
import pprint
|
||||
|
Loading…
Reference in New Issue
Block a user