Lines Matching refs:version

35 #    1.0.8 - changed Windows support to read version from kernel32.dll
44 # 0.8.0 - added sys.version parser and various new access
49 # 0.6.2 - support for OpenVMS - requires version 1.5.2-V006 or higher and
86 # You can always get the latest version of this module at:
124 # Helper for comparing two version number strings.
126 # http://php.net/manual/en/function.version-compare.php
141 def _comparable_version(version):
143 for v in _component_re.split(version):
161 def libc_ver(executable=None, lib='', version='', chunksize=16384):
163 """ Tries to determine the libc version that the file executable
166 Returns a tuple of strings (lib,version) which default to the
191 return lib, version
222 version = glibcversion
223 elif V(glibcversion) > V(version):
224 version = glibcversion
228 if soversion and (not version or V(soversion) > V(version)):
229 version = soversion
230 if threads and version[-len(threads):] != threads:
231 version = version + threads
233 return lib, version
235 def _norm_version(version, build=''):
237 """ Normalize the version and build strings and return a single
238 version string using the format major.minor.build (or patchlevel).
240 l = version.split('.')
247 version = '.'.join(strings[:3])
248 return version
263 def _syscmd_ver(system='', release='', version='',
267 """ Tries to figure out the OS version used and returns
268 a tuple (system, release, version).
278 return system, release, version
296 return system, release, version
302 system, release, version = m.groups()
303 # Strip trailing dots from version and release
306 if version[-1] == '.':
307 version = version[:-1]
308 # Normalize the version and build strings (eliminating additional
310 version = _norm_version(version)
311 return system, release, version
363 def win32_ver(release='', version='', csd='', ptype=''):
367 return release, version, csd, ptype
374 version = '{0}.{1}.{2}'.format(major, minor, build)
411 return release, version, csd, ptype
438 """ Get macOS version information and return it as tuple (release,
439 versioninfo, machine) with versioninfo being a tuple (version,
485 release = _java_getprop('java.version', release)
489 vm_release = _java_getprop('java.vm.version', vm_release)
494 os_version = _java_getprop('java.os.version', os_version)
501 def system_alias(system, release, version):
503 """ Returns (system, release, version) aliased to common
514 return system, release, version
537 # version arguments can be different than the currently running version.
539 return system, release, version
546 compatible format e.g. "system-version-machine".
657 (or sizeof(long) on Python version < 1.5.2) is used as
781 "system node release version machine")
790 _fields = ('system', 'node', 'release', 'version', 'machine', 'processor')
828 of strings (system, node, release, version, machine, processor)
844 system, node, release, version, machine = infos = os.uname()
848 release = version = machine = ''
856 release, version, csd, ptype = win32_ver()
861 if not (release and version):
862 system, release, version = _syscmd_ver(system)
873 if '6.0' == version[:3]:
881 if not version:
883 version = '32bit'
885 version = '16bit'
891 version = ', '.join(vminfo)
892 if not version:
893 version = vendor
897 # OpenVMS seems to have release and version mixed up
899 release = version
900 version = ''
907 vals = system, node, release, version, machine
942 def version():
944 """ Returns the system's release version, e.g. '#3 on degas'
949 return uname().version
972 ### Various APIs for extracting information from sys.version
975 r'([\w.+]+)\s*' # "version<space>"
1004 """ Returns a parsed version of Python's sys.version as tuple
1005 (name, version, branch, revision, buildno, builddate, compiler)
1006 referring to the Python implementation name, version, branch,
1010 Note that unlike the Python sys.version, the returned value
1011 for the Python version will always include the patchlevel (it
1017 sys_version may be given to parse an alternative version
1018 string, e.g. if the version was read from a different Python
1022 # Get the Python version
1024 sys_version = sys.version
1042 'failed to parse IronPython sys.version: %s' %
1045 version, alt_version, compiler = match.groups()
1055 'failed to parse Jython sys.version: %s' %
1057 version, buildno, builddate, buildtime, _ = match.groups()
1067 raise ValueError("failed to parse PyPy sys.version: %s" %
1069 version, buildno, builddate, buildtime = match.groups()
1077 'failed to parse CPython sys.version: %s' %
1079 version, buildno, builddate, buildtime, compiler = \
1095 # Add the patchlevel version if missing
1096 l = version.split('.')
1099 version = '.'.join(l)
1102 result = (name, version, branch, revision, buildno, builddate, compiler)
1121 """ Returns the Python version as string 'major.minor.patchlevel'
1123 Note that unlike the Python sys.version, the returned value
1131 """ Returns the Python version as tuple (major, minor, patchlevel)
1134 Note that unlike the Python sys.version, the returned value
1212 system, node, release, version, machine, processor = uname()
1216 system, release, version = system_alias(system, release, version)
1227 rel, vers, csd, ptype = win32_ver(version)
1231 platform = _platform(system, release, version, csd)
1243 platform = _platform(system, release, version)
1245 platform = _platform(system, release, version,