diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2000-05-13 01:52:14 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2000-05-13 01:52:14 (GMT) |
commit | b5ebe5d640ceb6be376d69e5c006678075701e7a (patch) | |
tree | d2af3134f40986b93073b5be617ef67b06aff37b | |
parent | 52e399c9048ed23fb9a97b925721e5aeed2b7e90 (diff) | |
download | cpython-b5ebe5d640ceb6be376d69e5c006678075701e7a.zip cpython-b5ebe5d640ceb6be376d69e5c006678075701e7a.tar.gz cpython-b5ebe5d640ceb6be376d69e5c006678075701e7a.tar.bz2 |
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?)
-rw-r--r-- | Lib/distutils/command/build_ext.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index deb3b13..aa9ea0d 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -295,6 +295,14 @@ class build_ext (Command): macros = build_info.get ('macros') include_dirs = build_info.get ('include_dirs') 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, output_dir=self.build_temp, macros=macros, |