from rpython.translator.platform import platform from pypy.interpreter import gateway #XXX # the release serial 42 is not in range(16) CPYTHON_VERSION = (2, 7, 9, "final", 42) #XXX # sync CPYTHON_VERSION with patchlevel.h, package.py CPYTHON_API_VERSION = 1013 #XXX # sync with include/modsupport.h PYPY_VERSION = (2, 7, 0, "alpha", 0) #XXX # sync patchlevel.h if platform.name == 'msvc': COMPILER_INFO = 'MSC v.%d 32 bit' % (platform.version * 10 + 600) elif platform.cc is not None and \ os.path.basename(platform.cc).startswith(('gcc', 'clang')): from rpython.rtyper.tool import rffi_platform COMPILER_INFO = 'GCC ' + rffi_platform.getdefinedstring('__VERSION__', '') else: COMPILER_INFO = "" import pypy pypydir = os.path.dirname(os.path.abspath(pypy.__file__)) pypyroot = os.path.dirname(pypydir) del pypy from rpython.tool.version import get_repo_version_info import time as t gmtime = t.gmtime() date = t.strftime("%b %d %Y", gmtime) time = t.strftime("%H:%M:%S", gmtime) del t
import re from rpython.translator.platform import platform from pypy.interpreter import gateway #XXX # the release serial 42 is not in range(16) CPYTHON_VERSION = (2, 7, 3, "final", 42) #XXX # sync CPYTHON_VERSION with patchlevel.h, package.py CPYTHON_API_VERSION = 1013 #XXX # sync with include/modsupport.h PYPY_VERSION = (2, 1, 0, "alpha", 0) #XXX # sync patchlevel.h if platform.name == 'msvc': COMPILER_INFO = 'MSC v.%d 32 bit' % (platform.version * 10 + 600) elif platform.cc is not None and platform.cc.startswith(('gcc', 'clang')): from rpython.rtyper.tool import rffi_platform COMPILER_INFO = 'GCC ' + rffi_platform.getdefinedstring('__VERSION__', '') else: COMPILER_INFO = "" import pypy pypydir = os.path.dirname(os.path.abspath(pypy.__file__)) pypyroot = os.path.dirname(pypydir) del pypy from rpython.tool.version import get_repo_version_info import time as t gmtime = t.gmtime() date = t.strftime("%b %d %Y", gmtime) time = t.strftime("%H:%M:%S", gmtime) del t
def test_defined_constant_string(): value = rffi_platform.getdefinedstring('MCDONC', '') assert value is None value = rffi_platform.getdefinedstring('RAYDEO', '#define RAYDEO "Michael Merickel"') assert value == 'Michael Merickel'
def test_defined_constant_string(): value = rffi_platform.getdefinedstring('MCDONC', '') assert value is None value = rffi_platform.getdefinedstring( 'RAYDEO', '#define RAYDEO "Michael Merickel"') assert value == 'Michael Merickel'