Coverage for src/pymor/__init__ : 63%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
# This file is part of the pyMOR project (http://www.pymor.org). # Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# special casing for debian versions like '0.1.3~precise~ppa9' revstring = revstring[:revstring.index('~')] raise ValueError('Invalid revstring') else: self.distance = 0 self.shorthash = ''
raise ValueError('Invalid revstring') else:
if not isinstance(other, Version): other = Version(other) return self.version == other.version and self.rc_number == other.rc_number and self.distance == other.distance
if not isinstance(other, Version): other = Version(other) return self.full_version < other.full_version
other = Version(other)
return 'Version({})'.format(str(self))
revstring = os.environ['PYMOR_DEB_VERSION'] else: except ImportError: import os.path import subprocess try: revstring = subprocess.check_output(['git', 'describe', '--tags', '--candidates', '20', '--match', '*.*.*'], cwd=os.path.dirname(__file__)) except subprocess.CalledProcessError as e: import sys sys.stderr.write('''Warning: Could not determine current pyMOR version. Failed to import pymor.version and 'git describe --tags --candidates 20 --match *.*.*' returned
{}
(return code: {}) '''.format(e.output, e.returncode)) revstring = NO_VERSIONSTRING finally:
|