Exemple #1
0
def test_check_eci():
    eci = ExternalCompilationInfo()
    assert configure.check_eci(eci)
    eci = ExternalCompilationInfo(libraries=['some_name_that_doesnt_exist_'])
    assert not configure.check_eci(eci)
Exemple #2
0
def test_check_eci():
    eci = ExternalCompilationInfo()
    assert configure.check_eci(eci)
    eci = ExternalCompilationInfo(libraries=['some_name_that_doesnt_exist_'])
    assert not configure.check_eci(eci)
Exemple #3
0
class LocaleConfigure:
    _compilation_info_ = ExternalCompilationInfo(includes=['limits.h',
                                                           'locale.h'])
for key in _CONSTANTS:
    setattr(LocaleConfigure, key, DefinedConstantInteger(key))

config = configure(LocaleConfigure, noerr=True)
for key, value in config.items():
    if value is None:
        del config[key]
        _CONSTANTS.remove(key)

# ____________________________________________________________

eci = ExternalCompilationInfo(includes=['locale.h', 'langinfo.h'])
HAS_LANGINFO = check_eci(eci)

if HAS_LANGINFO:
    # list of all possible names
    langinfo_names = [
        "RADIXCHAR", "THOUSEP", "CRNCYSTR",
        "D_T_FMT", "D_FMT", "T_FMT", "AM_STR", "PM_STR",
        "CODESET", "T_FMT_AMPM", "ERA", "ERA_D_FMT", "ERA_D_T_FMT",
        "ERA_T_FMT", "ALT_DIGITS", "YESEXPR", "NOEXPR", "_DATE_FMT",
        ]
    for i in range(1, 8):
        langinfo_names.append("DAY_%d" % i)
        langinfo_names.append("ABDAY_%d" % i)
    for i in range(1, 13):
        langinfo_names.append("MON_%d" % i)
        langinfo_names.append("ABMON_%d" % i)
Exemple #4
0
        includes=['limits.h', 'locale.h'])


for key in _CONSTANTS:
    setattr(LocaleConfigure, key, DefinedConstantInteger(key))

config = configure(LocaleConfigure, noerr=True)
for key, value in config.items():
    if value is None:
        del config[key]
        _CONSTANTS.remove(key)

# ____________________________________________________________

eci = ExternalCompilationInfo(includes=['locale.h', 'langinfo.h'])
HAS_LANGINFO = check_eci(eci)

if HAS_LANGINFO:
    # list of all possible names
    langinfo_names = [
        "RADIXCHAR",
        "THOUSEP",
        "CRNCYSTR",
        "D_T_FMT",
        "D_FMT",
        "T_FMT",
        "AM_STR",
        "PM_STR",
        "CODESET",
        "T_FMT_AMPM",
        "ERA",