1# http://pyrocko.org - GPLv3
2#
3# The Pyrocko Developers, 21st Century
4# ---|P------/S----------~Lg----------
6from __future__ import print_function
8if __name__ == '__main__':
9 import sys
10 import pyrocko
11 import numpy
12 import scipy
13 try:
14 import matplotlib
15 except ImportError:
16 matplotlib = None
17 try:
18 from pyrocko.gui.qt_compat import Qt
19 except ImportError:
20 Qt = None
22 na = 'not available'
23 if sys.argv[1:] == ['deps']:
24 print('pyrocko: %s' % pyrocko.long_version)
25 print('numpy: %s' % numpy.__version__)
26 print('scipy: %s' % scipy.__version__)
27 print('matplotlib: %s' % (
28 matplotlib.__version__ if matplotlib else na))
29 print('PyQt: %s' % (Qt.PYQT_VERSION_STR if Qt else na))
30 print('Qt: %s' % (Qt.QT_VERSION_STR if Qt else na))
31 print('python: %s.%s.%s' % sys.version_info[:3])
32 elif sys.argv[1:] == ['short']:
33 print(pyrocko.version)
34 else:
35 print(pyrocko.long_version)