]> granicus.if.org Git - python/commitdiff
Fixed to respect 'define_macros' and 'undef_macros' on Extension object.
authorGreg Ward <gward@python.net>
Sun, 17 Sep 2000 00:54:58 +0000 (00:54 +0000)
committerGreg Ward <gward@python.net>
Sun, 17 Sep 2000 00:54:58 +0000 (00:54 +0000)
Lib/distutils/command/build_ext.py

index f880a7a8d5a39c2414961001f9c56d3f27e7afc0..d578b846aca370613142ce082e9c6381dccda684 100644 (file)
@@ -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)