Commit 176e335a authored by Jason Madden's avatar Jason Madden

distutils cflags may be None, e.g., on Win

parent 32b2ca28
......@@ -32,8 +32,8 @@ CARES_EMBED = should_embed('c-ares')
# See #616, trouble building for a 32-bit python on a 64-bit platform
# (Linux).
_config_cflags = distutils.sysconfig.get_config_var("CFLAGS")
cflags = _config_cflags + ((' ' + os.environ['CFLAGS']) if 'CFLAGS' in os.environ else '')
_config_cflags = distutils.sysconfig.get_config_var("CFLAGS") or ''
cflags = _config_cflags + ((' ' + os.environ['CFLAGS']) if os.environ.get("CFLAGS") else '')
cflags = ('CFLAGS="%s"' % (cflags,)) if cflags else ''
......
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