diff options
author | Greg Ward <gward@python.net> | 2000-09-17 00:54:58 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2000-09-17 00:54:58 (GMT) |
commit | df9e6b8196dc171fb764657c87fdf7378a1f47bd (patch) | |
tree | 600e5731d9e2b1099ea77a4e57bf569f237dfe55 /Lib | |
parent | d283ce73641c59013ddcfd29064181dd2c96bfcb (diff) | |
download | cpython-df9e6b8196dc171fb764657c87fdf7378a1f47bd.zip cpython-df9e6b8196dc171fb764657c87fdf7378a1f47bd.tar.gz cpython-df9e6b8196dc171fb764657c87fdf7378a1f47bd.tar.bz2 |
Fixed to respect 'define_macros' and 'undef_macros' on Extension object.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/distutils/command/build_ext.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index f880a7a..d578b84 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -403,6 +403,10 @@ class build_ext (Command): # command line args. Hence we combine them in order: extra_args = ext.extra_compile_args or [] + macros = ext.define_macros[:] + for undef in ext.undef_macros: + macros.append((undef,)) + # XXX and if we support CFLAGS, why not CC (compiler # executable), CPPFLAGS (pre-processor options), and LDFLAGS # (linker options) too? @@ -413,7 +417,7 @@ class build_ext (Command): objects = self.compiler.compile (sources, output_dir=self.build_temp, - #macros=macros, + macros=macros, include_dirs=ext.include_dirs, debug=self.debug, extra_postargs=extra_args) |