print(t.read(), file=sys.stderr) raise finally: os.chdir(cwd) ARES = Extension(name='gevent.resolver.cares', sources=['src/gevent/resolver/cares.pyx'], include_dirs=get_include_dirs( *([dep_abspath('c-ares')] if CARES_EMBED else [])), libraries=list(LIBRARIES), define_macros=list(DEFINE_MACROS), depends=glob_many('src/gevent/resolver/cares_*.[ch]')) ares_required = RUNNING_ON_CI and RUNNING_FROM_CHECKOUT ARES.optional = not ares_required if CARES_EMBED: ARES.sources += glob_many('deps/c-ares/*.c') # Strip the standalone binaries that would otherwise # cause linking issues for bin_c in ('acountry', 'adig', 'ahost'): ARES.sources.remove('deps/c-ares' + os.sep + bin_c + '.c') ARES.configure = configure_ares if WIN: ARES.libraries += ['advapi32'] ARES.define_macros += [('CARES_STATICLIB', '')] else: ARES.define_macros += [('HAVE_CONFIG_H', '')] if sys.platform != 'darwin': ARES.libraries += ['rt']
raise if sys.platform == 'darwin': make_universal_header('ares_build.h', 'CARES_SIZEOF_LONG') make_universal_header('ares_config.h', 'SIZEOF_LONG', 'SIZEOF_SIZE_T', 'SIZEOF_TIME_T') finally: os.chdir(cwd) ARES = Extension(name='gevent.ares', sources=['src/gevent/gevent.ares.c'], include_dirs=[dep_abspath('c-ares')] if CARES_EMBED else [], libraries=list(LIBRARIES), define_macros=list(DEFINE_MACROS), depends=glob_many('src/gevent/dnshelper.c', 'src/gevent/cares_*.[ch]')) ARES.optional = True if CARES_EMBED: ARES.sources += glob_many('deps/c-ares/*.c') # Strip the standalone binaries that would otherwise # cause linking issues for bin_c in ('acountry', 'adig', 'ahost'): try: ARES.sources.remove('deps/c-ares/' + bin_c + '.c') except ValueError: pass ARES.configure = configure_ares if WIN: ARES.libraries += ['advapi32'] ARES.define_macros += [('CARES_STATICLIB', '')]
make_universal_header('ares_build.h', 'CARES_SIZEOF_LONG') make_universal_header('ares_config.h', 'SIZEOF_LONG', 'SIZEOF_SIZE_T', 'SIZEOF_TIME_T') finally: os.chdir(cwd) ARES = Extension(name='gevent.resolver.cares', sources=['src/gevent/resolver/cares.pyx'], include_dirs=['src/gevent/resolver'] + [dep_abspath('c-ares')] if CARES_EMBED else [], libraries=list(LIBRARIES), define_macros=list(DEFINE_MACROS), depends=glob_many('src/gevent/resolver/dnshelper.c', 'src/gevent/resolver/cares_*.[ch]')) ares_required = RUNNING_ON_CI and RUNNING_FROM_CHECKOUT ARES.optional = not ares_required if CARES_EMBED: ARES.sources += glob_many('deps/c-ares/*.c') # Strip the standalone binaries that would otherwise # cause linking issues for bin_c in ('acountry', 'adig', 'ahost'): ARES.sources.remove('deps/c-ares' + os.sep + bin_c + '.c') ARES.configure = configure_ares if WIN: ARES.libraries += ['advapi32'] ARES.define_macros += [('CARES_STATICLIB', '')] else: ARES.define_macros += [('HAVE_CONFIG_H', '')] if sys.platform != 'darwin':
make_universal_header('ares_config.h', 'SIZEOF_LONG', 'SIZEOF_SIZE_T', 'SIZEOF_TIME_T') finally: os.chdir(cwd) ARES = Extension(name='gevent.resolver.cares', sources=['src/gevent/resolver/cares.pyx'], include_dirs=['src/gevent/resolver'] + [dep_abspath('c-ares')] if CARES_EMBED else [], libraries=list(LIBRARIES), define_macros=list(DEFINE_MACROS), depends=glob_many('src/gevent/resolver/dnshelper.c', 'src/gevent/resolver/cares_*.[ch]')) ARES.optional = not RUNNING_ON_CI if CARES_EMBED: ARES.sources += glob_many('deps/c-ares/*.c') # Strip the standalone binaries that would otherwise # cause linking issues for bin_c in ('acountry', 'adig', 'ahost'): ARES.sources.remove('deps/c-ares' + os.sep + bin_c + '.c') ARES.configure = configure_ares if WIN: ARES.libraries += ['advapi32'] ARES.define_macros += [('CARES_STATICLIB', '')] else: ARES.define_macros += [('HAVE_CONFIG_H', '')] if sys.platform != 'darwin': ARES.libraries += ['rt']