Lines Matching +full:pypy +full:- +full:c
3 """ This module tries to retrieve as much platform-identifying data as
11 # This module is maintained by Marc-Andre Lemburg <mal@egenix.com>.
19 # * support for MS-DOS (PythonDX ?)
23 # Many thanks to all those who helped adding platform-specific
38 # 1.0.8 - changed Windows support to read version from kernel32.dll
39 # 1.0.7 - added DEV_NULL
40 # 1.0.6 - added linux_distribution()
41 # 1.0.5 - fixed Java support to allow running the module on Jython
42 # 1.0.4 - added IronPython support
43 # 1.0.3 - added normalization of Windows system name
44 # 1.0.2 - added more Windows support
45 # 1.0.1 - reformatted to make doc.py happy
46 # 1.0.0 - reformatted a bit and checked into Python CVS
47 # 0.8.0 - added sys.version parser and various new access
49 # 0.7.2 - fixed architecture() to use sizeof(pointer) where available
50 # 0.7.1 - added support for Caldera OpenLinux
51 # 0.7.0 - some fixes for WinCE; untabified the source file
52 # 0.6.2 - support for OpenVMS - requires version 1.5.2-V006 or higher and
54 # 0.6.1 - added code to prevent 'uname -p' on platforms which are
56 # 0.6.0 - fixed win32_ver() to hopefully work on Win95,98,NT and Win2k;
57 # did some cleanup of the interfaces - some APIs have changed
58 # 0.5.5 - fixed another type in the MacOS code... should have
59 # used more coffee today ;-)
60 # 0.5.4 - fixed a few typos in the MacOS code
61 # 0.5.3 - added experimental MacOS support; added better popen()
62 # workarounds in _syscmd_ver() -- still not 100% elegant
64 # 0.5.2 - fixed uname() to return '' instead of 'unknown' in all
67 # 0.5.1 - included code for slackware dist; added exception handlers
71 # 0.5.0 - changed the API names referring to system commands to *syscmd*;
73 # API (was system_ver() in previous versions) -- use uname()
76 # 0.4.0 - added win32_ver() and modified the platform() output for WinXX
77 # 0.3.4 - fixed a bug in _follow_symlinks()
78 # 0.3.3 - fixed popen() and "file" command invokation bugs
79 # 0.3.2 - added architecture() API and support for it in platform()
80 # 0.3.1 - fixed syscmd_ver() RE to support Windows NT
81 # 0.3.0 - added system alias support
82 # 0.2.3 - removed 'wince' again... oh well.
83 # 0.2.2 - added 'wince' to syscmd_ver() supported platforms
84 # 0.2.1 - added cache logic and changed the platform string format
85 # 0.2.0 - changed the API to use functions instead of module globals
87 # 0.1.0 - first release
96 Copyright (c) 1999-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com
97 Copyright (c) 2000-2010, eGenix.com Software GmbH; mailto:info@egenix.com
137 # http://php.net/manual/en/function.version-compare.php
144 'c': 40,
150 _component_re = re.compile(r'([0-9]+|[._+-])')
155 if v not in '._+-':
168 '(GLIBC_([0-9.]+))'
170 '(libc(_\w+)?\.so(?:\.(\d[0-9.]*))?)')
201 binary = binary[max(pos, len(binary) - 1000):] + chunk
220 if threads and version[-len(threads):] != threads:
234 if os.path.exists('/var/adm/inst-log/info'):
236 info = open('/var/adm/inst-log/info').readlines()
247 values = string.split(value,'-')
255 pkg = string.split(line,'-')
264 for n in range(len(verfiles)-1, -1, -1):
265 if verfiles[n][:14] != 'slack-version-':
270 version = verfiles[-1][14:]
275 _release_filename = re.compile(r'(\w+)[-_](release|version)')
280 _release_version = re.compile(r'([^0-9]+)'
286 # and http://linuxmafia.com/faq/Admin/release-files.html
287 # and http://data.linux-ntfs.org/rpm/whichrpm
309 # Pre-LSB format: "distro x.x (codename)"
415 raise ValueError,'popen()-emulation only supports read mode'
459 # in the MS C lib (see MS KnowledgeBase article Q150956)
532 for cmd in ('ver','command /c ver','cmd /c ver'):
557 if release[-1] == '.':
558 release = release[:-1]
559 if version[-1] == '.':
560 version = version[:-1]
569 # Strictly, 5.2 client is XP 64-bit, but platform.py historically
872 # Modify release (marketing release = SunOS release - 3)
880 major = major - 3
890 # IRIX reports IRIX64 on platforms with 64-bit support; yet it
891 # is really a version and not a different platform, since 32-bit
910 compatible format e.g. "system-version-machine".
916 '-')
921 platform = replace(platform,'/','-')
922 platform = replace(platform,'\\','-')
923 platform = replace(platform,':','-')
924 platform = replace(platform,';','-')
925 platform = replace(platform,'"','-')
926 platform = replace(platform,'(','-')
927 platform = replace(platform,')','-')
932 # Fold '--'s and remove trailing '-'
934 cleaned = replace(platform,'--','-')
938 while platform[-1] == '-':
939 platform = platform[:-1]
1007 The function uses the -b option of the file command to have it
1008 ommit the filename in its output and if possible the -L option
1019 # gcc -o python \
1021 # libpython2.7.a -lsocket -lnsl -ldl -lm
1052 # Default values for architecture; non-empty strings override the
1078 platforms. On some non-Unix platforms where the "file" command
1120 if '32-bit' in fileout:
1125 elif '64-bit' in fileout:
1139 elif 'MS-DOS' in fileout:
1262 processor = _syscmd_uname('-p','')
1366 '\(([\d.]+)\) on ([\w.]+ [\d.]+(?: \(\d+-bit\))?)\)'
1372 '\[PyPy [^\]]+\]?')
1436 elif "PyPy" in sys_version:
1437 # PyPy
1438 name = "PyPy"
1441 raise ValueError("failed to parse PyPy sys.version: %s" %
1484 'CPython' (C implementation of Python),
1487 'PyPy' (Python implementation of Python).
1556 ### The Opus Magnum of platform strings :-)
1644 terse = ('terse' in sys.argv or '--terse' in sys.argv)
1645 aliased = (not 'nonaliased' in sys.argv and not '--nonaliased' in sys.argv)