Commit 415f5d1b authored by Denis Bilenko's avatar Denis Bilenko

merge

parents 6bc1f938 94a677c8
......@@ -22,7 +22,8 @@ assert __version__
ares_embed = os.path.exists('c-ares')
define_macros = []
libraries = []
ares_configure_command = './configure CONFIG_COMMANDS= CONFIG_FILES='
ares_configure_command = [abspath('c-ares/configure'),
'CONFIG_COMMANDS=', 'CONFIG_FILES=']
if sys.platform == 'win32':
......@@ -59,10 +60,12 @@ if os.path.exists('libev'):
def need_configure_ares():
if sys.platform == 'win32':
return False
if 'Generated from ares_build.h.in by configure' not in read('c-ares/ares_build.h'):
return True
if not os.path.exists('c-ares/ares_config.h'):
return True
if not os.path.exists('c-ares/ares_build.h'):
return True
if 'Generated from ares_build.h.in by configure' not in read('c-ares/ares_build.h'):
return True
def make_universal_header(filename, *defines):
......@@ -86,7 +89,8 @@ def make_universal_header(filename, *defines):
def configure_ares():
if need_configure_ares():
rc = os.system('cd c-ares && %s' % ares_configure_command)
os.chmod(ares_configure_command[0], 0755) # pip loses permissions
rc = os.system('cd c-ares && %s' % ' '.join(ares_configure_command))
if rc == 0 and sys.platform == 'darwin':
make_universal_header('c-ares/ares_build.h', 'CARES_SIZEOF_LONG')
make_universal_header('c-ares/ares_config.h', 'SIZEOF_LONG', 'SIZEOF_SIZE_T', 'SIZEOF_TIME_T')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment