Пример #1
0
 def __init__(self):
     StrictVersion.__init__(self)
     tversion = '0.0.0'
     ccp4_major_minor = os.path.join(os.environ["CCP4"], "lib", "ccp4", "MAJOR_MINOR")
     if os.path.isfile(ccp4_major_minor):
         with open(ccp4_major_minor, "r") as f_in:
             tversion = f_in.read().strip()
     self.parse(tversion)
Пример #2
0
 def __init__(self):
     StrictVersion.__init__(self)
     tversion = '0.0.0'
     ccp4_major_minor = os.path.join(os.environ["CCP4"], "lib", "ccp4",
                                     "MAJOR_MINOR")
     if os.path.isfile(ccp4_major_minor):
         with open(ccp4_major_minor, "r") as f_in:
             tversion = f_in.read().strip()
     self.parse(tversion)
Пример #3
0
 def __init__(self):
     StrictVersion.__init__(self)
     ccp4_major_minor = os.path.join(os.environ["CCP4"], "lib", "ccp4", "MAJOR_MINOR")
     if os.path.isfile(ccp4_major_minor):
         with open(ccp4_major_minor, "r") as f_in:
             tversion = f_in.read().strip()
     else:
         logger = logging.getLogger(__name__)
         logger.debug("Detecting CCP4 version via executing pdbcur")
         stdout = cexec(['pdbcur' + EXE_EXT], permit_nonzero=True)
         tversion = None
         for line in stdout.split(os.linesep):
             if line.startswith(' ### CCP4'):
                 tversion = line.split()[2].rstrip(':')
         if tversion is None:
             raise RuntimeError("Cannot determine CCP4 version")
     self.parse(tversion)
Пример #4
0
 def __init__(self):
     StrictVersion.__init__(self)
     ccp4_major_minor = os.path.join(os.environ["CCP4"], "lib", "ccp4",
                                     "MAJOR_MINOR")
     if os.path.isfile(ccp4_major_minor):
         with open(ccp4_major_minor, "r") as f_in:
             tversion = f_in.read().strip()
     else:
         logger = logging.getLogger(__name__)
         logger.debug("Detecting CCP4 version via executing pdbcur")
         stdout = cexec(['pdbcur' + EXE_EXT], permit_nonzero=True)
         tversion = None
         for line in stdout.split(os.linesep):
             if line.startswith(' ### CCP4'):
                 tversion = line.split()[2].rstrip(':')
         if tversion is None:
             raise RuntimeError("Cannot determine CCP4 version")
     self.parse(tversion)
Пример #5
0
 def __init__(self, v):
     print(v)
     if v.endswith('a'):
         v += '0'
     StrictVersion.__init__(self, v)
Пример #6
0
 def __init__(self, version):
     match = re.match("dlib-(\d+).(\d+).*", version)
     major = match.group(1)
     minor = match.group(2)
     StrictVersion.__init__(self, major + "." + minor)
Пример #7
0
 def __init__(self, vstring):
     StrictVersion.__init__(self, vstring)
     self.prerelease = None
Пример #8
0
 def __init__(self, v):
     print v
     if v.endswith('a'):
         v += '0'
     StrictVersion.__init__(self, v)
Пример #9
0
 def __init__(self, version):
     match = re.match("dlib-(\d+).(\d+).*", version)
     major = match.group(1)
     minor = match.group(2)
     StrictVersion.__init__(self, major + "." + minor)
Пример #10
0
 def __init__(self, v):
     if isinstance(v, bytes):
         v = v.decode('ascii')
     if v.endswith('a'):
         v += '0'
     StrictVersion.__init__(self, v)