Kaydet (Commit) b5ebe5d6 authored tarafından Gregory P. Smith's avatar Gregory P. Smith

Harry Henry Gebel: get extra compiler flags from the CFLAGS environment

variable.

(Is this really needed?  Can we drop it when the config file mechanism
allows users to set compiler flags in setup.cfg?)
üst 52e399c9
...@@ -295,6 +295,14 @@ class build_ext (Command): ...@@ -295,6 +295,14 @@ class build_ext (Command):
macros = build_info.get ('macros') macros = build_info.get ('macros')
include_dirs = build_info.get ('include_dirs') include_dirs = build_info.get ('include_dirs')
extra_args = build_info.get ('extra_compile_args') extra_args = build_info.get ('extra_compile_args')
# honor CFLAGS enviroment variable
# XXX do we *really* need this? or is it just a hack until
# the user can put compiler flags in setup.cfg?
if os.environ.has_key('CFLAGS'):
if not extra_args:
extra_args = []
extra_args = string.split(os.environ['CFLAGS']) + extra_args
objects = self.compiler.compile (sources, objects = self.compiler.compile (sources,
output_dir=self.build_temp, output_dir=self.build_temp,
macros=macros, macros=macros,
......
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