def _check_python_version(): """Check the minimum Python version """ pyver = platform.python_version() if not version.check('python', pyver): print >> sys.stderr, ('Python version %s or newer required. ' 'Found %s' % (version.get('python'), pyver)) sys.exit(1)
def _check_git_version(): """Check the minimum GIT version """ git_version = version.git_version() if not version.check('git', git_version): print >> sys.stderr, ('GIT version %s or newer required. ' 'Found %s' % (version.get('git'), git_version)) sys.exit(1)
def _check_python_version(): """Check the minimum Python version """ pyver = '.'.join(map(lambda x: str(x), sys.version_info)) if not version.check('python', pyver): print >> sys.stderr, ('Python version %s or newer required. ' 'Found %s' % (version.get('python'), pyver)) sys.exit(1)
def _check_pyqt_version(): """Check the minimum PyQt version """ pyqtver = 'None' try: from PyQt4 import QtCore pyqtver = QtCore.PYQT_VERSION_STR if version.check('pyqt', pyqtver): return except ImportError: pass print >> sys.stderr, ('PyQt4 version %s or newer required. ' 'Found %s' % (version.get('pyqt'), pyqtver)) sys.exit(1)
def _check_jsonpickle_version(): """Check the minimum jsonpickle version """ jsonpicklever = 'None' try: import jsonpickle jsonpicklever = jsonpickle.__version__ if version.check('jsonpickle', jsonpicklever): return except ImportError: pass print >> sys.stderr, ('jsonpickle version %s or newer required. ' 'Found %s' % (version.get('jsonpickle'), jsonpicklever)) sys.exit(1)